Merge "Fix flaky testNattSocketKeepalives" am: 9a9e288607

am: ec2b289d42

Change-Id: I20ec043e5caeb61c4e31f087a10deb2dc13c0d95
This commit is contained in:
Remi NGUYEN VAN
2019-02-13 21:24:35 -08:00
committed by android-build-merger

View File

@@ -3791,11 +3791,14 @@ public class ConnectivityServiceTest {
}
@Test
public void testNattSocketKeepalives() throws Exception {
public void testNattSocketKeepalives_SingleThreadExecutor() throws Exception {
final ExecutorService executorSingleThread = Executors.newSingleThreadExecutor();
doTestNattSocketKeepalivesWithExecutor(executorSingleThread);
executorSingleThread.shutdown();
}
@Test
public void testNattSocketKeepalives_InlineExecutor() throws Exception {
final Executor executorInline = (Runnable r) -> r.run();
doTestNattSocketKeepalivesWithExecutor(executorInline);
}
@@ -3937,6 +3940,7 @@ public class ConnectivityServiceTest {
testSocket2.close();
mWiFiNetworkAgent.disconnect();
waitFor(mWiFiNetworkAgent.getDisconnectedCV());
}
@Test