Merge "Extend timeout for receiving broadcasts" am: 08ef7ddaff am: 04707731d3 am: 132b0dcbad

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1614339

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8ba4984427e72554c0aff2c173e72bdb93a9ea3c
This commit is contained in:
Treehugger Robot
2021-03-03 13:29:45 +00:00
committed by Automerger Merge Worker

View File

@@ -351,6 +351,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
@@ -1685,7 +1688,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 {