Merge "Fix flaky testNattSocketKeepalives" am: 296c5ed68d am: 793f58bb98

am: 0709f0a13f

Change-Id: Ibfdd4dddb8dad9ee26f9f1ec175ca87bc46ce761
This commit is contained in:
Remi NGUYEN VAN
2019-02-13 21:45:39 -08:00
committed by android-build-merger

View File

@@ -3817,11 +3817,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);
}
@@ -3963,6 +3966,7 @@ public class ConnectivityServiceTest {
testSocket2.close();
mWiFiNetworkAgent.disconnect();
waitFor(mWiFiNetworkAgent.getDisconnectedCV());
}
@Test