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

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

Issue 24539002: dart:io | Enable connection cache for secure networking clients. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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 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_multiple_client_server_test.dart
diff --git a/tests/standalone/io/secure_multiple_client_server_test.dart b/tests/standalone/io/secure_multiple_client_server_test.dart
index d3adf57e1e43a0f24abef149782821f73b8f7c88..c1236978956bcb1479482ee3e890f16bab645771 100644
--- a/tests/standalone/io/secure_multiple_client_server_test.dart
+++ b/tests/standalone/io/secure_multiple_client_server_test.dart
@@ -6,6 +6,10 @@
// VMOptions=--short_socket_read
// VMOptions=--short_socket_write
// VMOptions=--short_socket_read --short_socket_write
+// Tests multiple secure connections from a client to a server.
+// A delay is inserted so that later connections use the secure
+// connection cache to reestablish connection with a shorter handshake.
Søren Thygesen Gjesse 2013/09/25 10:34:59 I guess that there is not way to check if this is
Bill Hesse 2013/09/25 11:19:54 No.
+
import "package:expect/expect.dart";
import "package:path/path.dart";
@@ -33,8 +37,13 @@ Future<SecureServerSocket> startServer() {
});
}
+Duration delay = new Duration(milliseconds: 0);
+Duration betweenTests = new Duration(milliseconds: 200);
Søren Thygesen Gjesse 2013/09/25 10:34:59 Move or duplicate the comment here.
Bill Hesse 2013/09/25 11:19:54 Done.
Future testClient(server, name) {
- return SecureSocket.connect(HOST_NAME, server.port).then((socket) {
+ delay += betweenTests;
+ return new Future.delayed(delay).then((_) {
+ return SecureSocket.connect(HOST_NAME, server.port);
+ }).then((socket) {
socket.add("Hello from client $name".codeUnits);
socket.close();
return socket.fold(<int>[], (message, data) => message..addAll(data))
« 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