summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Remi NGUYEN VAN <reminv@google.com> 2019-02-13 20:42:01 -0800
committer android-build-merger <android-build-merger@google.com> 2019-02-13 20:42:01 -0800
commitdef37aef89044d050f52547a071ad10f60083fb2 (patch)
treeca3666aa0b9863c5c314c5acda64ae26013ffcfd
parentfeee99e5947cf3a8fd04b02c0212c13029f61ccf (diff)
parent16758070d06ce097cb39ad751a10953b7159561d (diff)
Merge "Fix flaky testNattSocketKeepalives"
am: 16758070d0 Change-Id: Ie9fe40e3bcf4187a2e5cbf525bc4e874cff70747
-rw-r--r--tests/net/java/com/android/server/ConnectivityServiceTest.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/net/java/com/android/server/ConnectivityServiceTest.java b/tests/net/java/com/android/server/ConnectivityServiceTest.java
index 963b6851efea..c83ab84d6683 100644
--- a/tests/net/java/com/android/server/ConnectivityServiceTest.java
+++ b/tests/net/java/com/android/server/ConnectivityServiceTest.java
@@ -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