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

Unified Diff: tests/standalone/io/secure_session_resume_test.dart

Issue 11478049: Disable SSL session cache to fix issue with SecureSocket connections. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/secure_socket.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
}
« no previous file with comments | « runtime/bin/secure_socket.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698