diff options
| author | 2019-02-13 20:42:01 -0800 | |
|---|---|---|
| committer | 2019-02-13 20:42:01 -0800 | |
| commit | def37aef89044d050f52547a071ad10f60083fb2 (patch) | |
| tree | ca3666aa0b9863c5c314c5acda64ae26013ffcfd | |
| parent | feee99e5947cf3a8fd04b02c0212c13029f61ccf (diff) | |
| parent | 16758070d06ce097cb39ad751a10953b7159561d (diff) | |
Merge "Fix flaky testNattSocketKeepalives"
am: 16758070d0
Change-Id: Ie9fe40e3bcf4187a2e5cbf525bc4e874cff70747
| -rw-r--r-- | tests/net/java/com/android/server/ConnectivityServiceTest.java | 6 |
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 |