Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: components/cronet/android/test/javatests/src/org/chromium/net/QuicTest.java

Issue 2224523002: Disable connection migration in cronet tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.net; 5 package org.chromium.net;
6 6
7 import android.os.ConditionVariable; 7 import android.os.ConditionVariable;
8 import android.test.suitebuilder.annotation.LargeTest; 8 import android.test.suitebuilder.annotation.LargeTest;
9 import android.test.suitebuilder.annotation.SmallTest; 9 import android.test.suitebuilder.annotation.SmallTest;
10 10
(...skipping 23 matching lines...) Expand all
34 super.setUp(); 34 super.setUp();
35 // Load library first, since we need the Quic test server's URL. 35 // Load library first, since we need the Quic test server's URL.
36 System.loadLibrary("cronet_tests"); 36 System.loadLibrary("cronet_tests");
37 QuicTestServer.startQuicTestServer(getContext()); 37 QuicTestServer.startQuicTestServer(getContext());
38 38
39 mBuilder = new CronetEngine.Builder(getContext()); 39 mBuilder = new CronetEngine.Builder(getContext());
40 mBuilder.enableQuic(true).enableNetworkQualityEstimator(true); 40 mBuilder.enableQuic(true).enableNetworkQualityEstimator(true);
41 mBuilder.addQuicHint(QuicTestServer.getServerHost(), QuicTestServer.getS erverPort(), 41 mBuilder.addQuicHint(QuicTestServer.getServerHost(), QuicTestServer.getS erverPort(),
42 QuicTestServer.getServerPort()); 42 QuicTestServer.getServerPort());
43 43
44 // TODO(mgersh): Enable connection migration once it works, see http://c rbug.com/634910
44 JSONObject quicParams = new JSONObject() 45 JSONObject quicParams = new JSONObject()
45 .put("connection_options", "PACE,IW10,FO O,DEADBEEF") 46 .put("connection_options", "PACE,IW10,FO O,DEADBEEF")
46 .put("host_whitelist", "test.example.com ") 47 .put("host_whitelist", "test.example.com ")
47 .put("max_server_configs_stored_in_prope rties", 2) 48 .put("max_server_configs_stored_in_prope rties", 2)
48 .put("delay_tcp_race", true) 49 .put("delay_tcp_race", true)
49 .put("max_number_of_lossy_connections", 10) 50 .put("max_number_of_lossy_connections", 10)
50 .put("packet_loss_threshold", 0.5) 51 .put("packet_loss_threshold", 0.5)
51 .put("idle_connection_timeout_seconds", 300) 52 .put("idle_connection_timeout_seconds", 300)
52 .put("close_sessions_on_ip_change", fals e) 53 .put("close_sessions_on_ip_change", fals e)
53 .put("migrate_sessions_on_network_change ", true) 54 .put("migrate_sessions_on_network_change ", false)
54 .put("migrate_sessions_early", true) 55 .put("migrate_sessions_early", false)
55 .put("race_cert_verification", true); 56 .put("race_cert_verification", true);
56 JSONObject experimentalOptions = new JSONObject().put("QUIC", quicParams ); 57 JSONObject experimentalOptions = new JSONObject().put("QUIC", quicParams );
57 mBuilder.setExperimentalOptions(experimentalOptions.toString()); 58 mBuilder.setExperimentalOptions(experimentalOptions.toString());
58 mBuilder.setMockCertVerifierForTesting(QuicTestServer.createMockCertVeri fier()); 59 mBuilder.setMockCertVerifierForTesting(QuicTestServer.createMockCertVeri fier());
59 mBuilder.setStoragePath(CronetTestFramework.getTestStorage(getContext()) ); 60 mBuilder.setStoragePath(CronetTestFramework.getTestStorage(getContext()) );
60 mBuilder.enableHttpCache(CronetEngine.Builder.HTTP_CACHE_DISK_NO_HTTP, 1 000 * 1024); 61 mBuilder.enableHttpCache(CronetEngine.Builder.HTTP_CACHE_DISK_NO_HTTP, 1 000 * 1024);
61 } 62 }
62 63
63 @Override 64 @Override
64 protected void tearDown() throws Exception { 65 protected void tearDown() throws Exception {
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 // that executor has finished posting the RTT observation to the RTT lis teners. 220 // that executor has finished posting the RTT observation to the RTT lis teners.
220 // NETWORK_QUALITY_OBSERVATION_SOURCE_URL_REQUEST 221 // NETWORK_QUALITY_OBSERVATION_SOURCE_URL_REQUEST
221 assertTrue(rttListener.rttObservationCount(0) > 0); 222 assertTrue(rttListener.rttObservationCount(0) > 0);
222 223
223 // NETWORK_QUALITY_OBSERVATION_SOURCE_QUIC 224 // NETWORK_QUALITY_OBSERVATION_SOURCE_QUIC
224 assertTrue(rttListener.rttObservationCount(2) > 0); 225 assertTrue(rttListener.rttObservationCount(2) > 0);
225 226
226 mTestFramework.mCronetEngine.shutdown(); 227 mTestFramework.mCronetEngine.shutdown();
227 } 228 }
228 } 229 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698