Chromium Code Reviews| Index: tests/standalone/io/secure_session_resume_test.dart |
| diff --git a/tests/standalone/io/secure_server_test.dart b/tests/standalone/io/secure_session_resume_test.dart |
| similarity index 79% |
| copy from tests/standalone/io/secure_server_test.dart |
| copy to tests/standalone/io/secure_session_resume_test.dart |
| index 89415483b9542d8d49b105715aacb69944818f6f..c70720ffb7216cb2fabe47f8e4b106d19e875814 100644 |
| --- a/tests/standalone/io/secure_server_test.dart |
| +++ b/tests/standalone/io/secure_session_resume_test.dart |
| @@ -2,6 +2,15 @@ |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| +// This test tests TLS session resume, by making multiple client connections |
| +// on the same port to the same server, with a delay of 200 ms between them. |
| +// The unmodified secure_server_test creates all sessions simultaneously, |
| +// which means that no handshake completes and caches its keys in the session |
| +// cache in time for other connections to use it. |
| +// |
| +// Session resume is currently disabled - see issue |
| +// https://code.google.com/p/dart/issues/detail?id=7230 |
| + |
| import "dart:io"; |
| import "dart:isolate"; |
| @@ -101,7 +110,8 @@ void main() { |
| Path scriptDir = new Path.fromNative(new Options().script).directoryPath; |
| Path certificateDatabase = scriptDir.append('pkcert'); |
| SecureSocket.initialize(database: certificateDatabase.toNativePath(), |
| - password: 'dartdart'); |
| + password: 'dartdart', |
| + useBuiltinRoots: false); |
| var server = new SecureTestServer(); |
| int port = server.start(); |
| @@ -112,7 +122,13 @@ void main() { |
| keepAlive.close(); |
| }; |
| + int delay = 0; |
| + int delay_between_connections = 200; // Milliseconds. |
|
Mads Ager (google)
2012/12/10 11:28:50
Does this fail with a smaller timeout as well? Can
Bill Hesse
2012/12/10 13:13:20
The timeout needs to be at least 200 ms, and more
|
| + |
| for (var x in CLIENT_NAMES) { |
| - new SecureTestClient(port, x); |
| + new Timer(delay, (_) { |
| + new SecureTestClient(port, x); |
| + }); |
| + delay += delay_between_connections; |
| } |
| } |