diff options
| author | 2021-03-03 08:51:04 +0000 | |
|---|---|---|
| committer | 2021-03-03 08:51:04 +0000 | |
| commit | a117895548368bb7c1e7c1b9e705ce19ed19acfd (patch) | |
| tree | 4a7c4d34b034739bd769b1aeb8808104a2eee397 | |
| parent | 46b1ae066616a531fd5cf551601af013f208302e (diff) | |
| parent | 15b5b58a7c12a7af92b2fd1bad54a524e18fa045 (diff) | |
Merge "Extend timeout for receiving broadcasts" am: 15b5b58a7c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1614339
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I14924edf870ff55c334113f5d1583862be20e0f8
| -rw-r--r-- | tests/net/java/com/android/server/ConnectivityServiceTest.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/net/java/com/android/server/ConnectivityServiceTest.java b/tests/net/java/com/android/server/ConnectivityServiceTest.java index c7e8282c8e8b..49453715ec0f 100644 --- a/tests/net/java/com/android/server/ConnectivityServiceTest.java +++ b/tests/net/java/com/android/server/ConnectivityServiceTest.java @@ -350,6 +350,9 @@ public class ConnectivityServiceTest { private static final String TAG = "ConnectivityServiceTest"; private static final int TIMEOUT_MS = 500; + // Broadcasts can take a long time to be delivered. The test will not wait for that long unless + // there is a failure, so use a long timeout. + private static final int BROADCAST_TIMEOUT_MS = 30_000; private static final int TEST_LINGER_DELAY_MS = 400; private static final int TEST_NASCENT_DELAY_MS = 300; // Chosen to be less than the linger and nascent timeout. This ensures that we can distinguish @@ -1687,7 +1690,7 @@ public class ConnectivityServiceTest { } public Intent expectBroadcast() throws Exception { - return expectBroadcast(TIMEOUT_MS); + return expectBroadcast(BROADCAST_TIMEOUT_MS); } public void expectNoBroadcast(int timeoutMs) throws Exception { |