commit | bac55b7eeba056ce614a292a4e1c3b121b77a77a | [log] [tgz] |
---|---|---|
author | Lucas Lin <lucaslin@google.com> | Fri Jun 05 09:19:38 2020 +0000 |
committer | Lucas Lin <lucaslin@google.com> | Mon Jun 08 03:54:48 2020 +0000 |
tree | 795405d2cd522303d5c47bfd61f04dc25e857ed7 | |
parent | f0a78c385d25190b064b69fdee84e94fef085174 [diff] |
Enlarge the onAvailable callback timeout to 30 seconds Sometimes the device may take a long time to connect to the wifi, try to enlarge the timeout to lower the fail rate of test. Bug: 157391946 Test: atest CtsHostsideNetworkTests:com.android.cts.net.HostsideNetworkCallbackTests Original-Change: https://android-review.googlesource.com/1324092 Merged-In: Ie89936ecc2d70ee22dd312067ccedd2523e81855 Change-Id: Ie89936ecc2d70ee22dd312067ccedd2523e81855
diff --git a/tests/cts/hostside/app/src/com/android/cts/net/hostside/NetworkCallbackTest.java b/tests/cts/hostside/app/src/com/android/cts/net/hostside/NetworkCallbackTest.java index f3cd8a9..aa59959 100644 --- a/tests/cts/hostside/app/src/com/android/cts/net/hostside/NetworkCallbackTest.java +++ b/tests/cts/hostside/app/src/com/android/cts/net/hostside/NetworkCallbackTest.java
@@ -83,6 +83,7 @@ } private class TestNetworkCallback extends INetworkCallback.Stub { + private static final int TEST_CONNECT_TIMEOUT_MS = 30_000; private static final int TEST_CALLBACK_TIMEOUT_MS = 5_000; private final LinkedBlockingQueue<CallbackInfo> mCallbacks = new LinkedBlockingQueue<>(); @@ -131,7 +132,7 @@ } public Network expectAvailableCallbackAndGetNetwork() { - final CallbackInfo cb = nextCallback(TEST_CALLBACK_TIMEOUT_MS); + final CallbackInfo cb = nextCallback(TEST_CONNECT_TIMEOUT_MS); if (cb.state != CallbackState.AVAILABLE) { fail("Network is not available. Instead obtained the following callback :" + cb);