Merge "Fix testPhysicalEthernet failure for physical ethernet device" am: 1a978c0300
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2514919 Change-Id: I3e105e53564e1c933d70ea6688029b12ecc84bdf Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -215,6 +215,13 @@ public abstract class EthernetTetheringTestBase {
|
||||
}
|
||||
}
|
||||
|
||||
protected void stopEthernetTethering(final MyTetheringEventCallback callback) {
|
||||
runAsShell(TETHER_PRIVILEGED, () -> {
|
||||
mTm.stopTethering(TETHERING_ETHERNET);
|
||||
maybeUnregisterTetheringEventCallback(callback);
|
||||
});
|
||||
}
|
||||
|
||||
protected void cleanUp() throws Exception {
|
||||
setPreferTestNetworks(false);
|
||||
|
||||
|
||||
@@ -364,7 +364,7 @@ public class EthernetTetheringTest extends EthernetTetheringTestBase {
|
||||
// Enable Ethernet tethering and check that it starts.
|
||||
tetheringEventCallback = enableEthernetTethering(iface, null /* any upstream */);
|
||||
} finally {
|
||||
maybeUnregisterTetheringEventCallback(tetheringEventCallback);
|
||||
stopEthernetTethering(tetheringEventCallback);
|
||||
}
|
||||
// There is nothing more we can do on a physical interface without connecting an actual
|
||||
// client, which is not possible in this test.
|
||||
|
||||
Reference in New Issue
Block a user