From 4d7887a2fab512f817b8c6b579314f1616c81d41 Mon Sep 17 00:00:00 2001 From: Hugo Benichi Date: Mon, 29 May 2017 13:13:52 +0900 Subject: [PATCH] ConnectivityServiceTest: more tweaks to testRequestBenchmark Recent continuous testing runs indicates that commit 79614aee did not completely fixed the issue with testRequestBenchmark. This patch changes the name of the test to not include "test" and removes @SmallTest annotation, which should do the job of @Ignore while ConnectivityServiceTest still extends AndroidTestCase. In addition timeouts are adjusted to take into account recent failures observed. This is the last pending action before turning on FrameworksNetTests on presubmits. Bug: 32561414 Test: no functional change Change-Id: I56ef334e19e99e5a3483418330e5f0ccd6eb31bb --- .../java/com/android/server/ConnectivityServiceTest.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/net/java/com/android/server/ConnectivityServiceTest.java b/tests/net/java/com/android/server/ConnectivityServiceTest.java index 4fdbfe75da..0263c57879 100644 --- a/tests/net/java/com/android/server/ConnectivityServiceTest.java +++ b/tests/net/java/com/android/server/ConnectivityServiceTest.java @@ -2411,8 +2411,7 @@ public class ConnectivityServiceTest extends AndroidTestCase { } @Ignore // This test has instrinsic chances of spurious failures: ignore for continuous testing. - @SmallTest - public void testRequestBenchmark() throws Exception { + public void benchmarkRequestRegistrationAndCallbackDispatch() throws Exception { // TODO: turn this unit test into a real benchmarking test. // Benchmarks connecting and switching performance in the presence of a large number of // NetworkRequests. @@ -2422,9 +2421,9 @@ public class ConnectivityServiceTest extends AndroidTestCase { // and NUM_REQUESTS onAvailable callbacks to fire. // See how long it took. final int NUM_REQUESTS = 90; - final int REGISTER_TIME_LIMIT_MS = 180; - final int CONNECT_TIME_LIMIT_MS = 50; - final int SWITCH_TIME_LIMIT_MS = 50; + final int REGISTER_TIME_LIMIT_MS = 200; + final int CONNECT_TIME_LIMIT_MS = 60; + final int SWITCH_TIME_LIMIT_MS = 60; final int UNREGISTER_TIME_LIMIT_MS = 20; final NetworkRequest request = new NetworkRequest.Builder().clearCapabilities().build();