| 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 78%
|
| copy from tests/standalone/io/secure_server_test.dart
|
| copy to tests/standalone/io/secure_session_resume_test.dart
|
| index 89415483b9542d8d49b105715aacb69944818f6f..825351ace316ec8d51f6ef0f0325ae86f069aea7 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";
|
|
|
| @@ -94,14 +103,15 @@ class SecureTestClient {
|
|
|
| Function EndTest;
|
|
|
| -const CLIENT_NAMES = const ['able', 'baker', 'camera', 'donut', 'echo'];
|
| +const CLIENT_NAMES = const ['able', 'baker'];
|
|
|
| void main() {
|
| ReceivePort keepAlive = new ReceivePort();
|
| 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 = 300; // Milliseconds.
|
| +
|
| for (var x in CLIENT_NAMES) {
|
| - new SecureTestClient(port, x);
|
| + new Timer(delay, (_) {
|
| + new SecureTestClient(port, x);
|
| + });
|
| + delay += delay_between_connections;
|
| }
|
| }
|
|
|