diff options
| author | 2019-02-13 21:24:35 -0800 | |
|---|---|---|
| committer | 2019-02-13 21:24:35 -0800 | |
| commit | 0ed6920494bbee3ec2e72eabf79826e9c7d2f7ec (patch) | |
| tree | a0bbe8cb9a65a8e7ebea9558ca4becf6a71865b8 | |
| parent | f3d7a41dd12a58b2499b30dd11a4a4d93e353279 (diff) | |
| parent | def37aef89044d050f52547a071ad10f60083fb2 (diff) | |
Merge "Fix flaky testNattSocketKeepalives" am: 16758070d0
am: def37aef89
Change-Id: I20ec043e5caeb61c4e31f087a10deb2dc13c0d95
| -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 |