Fix flakes in tests running after testIsPrivateDnsBroken
The test would not reconnect wifi after restoring the private DNS setting, so validation would not be triggered, and it would remain identified as having broken private DNS. Reconnect wifi after the test to avoid affecting subsequent tests. Change-Id: Id9beba94e0fed85bd26c0509ad61369be794f3c3 Test: atest android.net.cts.ConnectivityManagerTest Bug: 182296835
This commit is contained in:
@@ -736,6 +736,8 @@ public class ConnectivityManagerTest {
|
||||
.isPrivateDnsBroken()) && networkForPrivateDns.equals(entry.getNetwork()));
|
||||
} finally {
|
||||
mCtsNetUtils.restorePrivateDnsSetting();
|
||||
// Toggle wifi to make sure it is re-validated
|
||||
reconnectWifi();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user