Merge "Fix testPhysicalEthernet failure for physical ethernet device"
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