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

Side by Side Diff: tests/standalone/io/raw_secure_server_socket_test.dart

Issue 14189020: Try to fix flakiness of test standalone/io/raw_secure_server_socket_test (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « sdk/lib/io/secure_socket.dart ('k') | 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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // VMOptions= 5 // VMOptions=
6 // VMOptions=--short_socket_read 6 // VMOptions=--short_socket_read
7 // VMOptions=--short_socket_write 7 // VMOptions=--short_socket_write
8 // VMOptions=--short_socket_read --short_socket_write 8 // VMOptions=--short_socket_read --short_socket_write
9 9
10 import "package:expect/expect.dart"; 10 import "package:expect/expect.dart";
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 if (bytesRead < data.length) { 307 if (bytesRead < data.length) {
308 Expect.isTrue(bytesWritten == 0); 308 Expect.isTrue(bytesWritten == 0);
309 } 309 }
310 Expect.isTrue(client.available() > 0); 310 Expect.isTrue(client.available() > 0);
311 var buffer = client.read(); 311 var buffer = client.read();
312 if (buffer != null) { 312 if (buffer != null) {
313 if (bytesRead == data.length) { 313 if (bytesRead == data.length) {
314 // Read first part of TLS handshake from client. 314 // Read first part of TLS handshake from client.
315 Expect.isTrue(postponeSecure); 315 Expect.isTrue(postponeSecure);
316 completer.complete([subscription, buffer]); 316 completer.complete([subscription, buffer]);
317 client.readEventsEnabled = false;
317 return; 318 return;
318 } 319 }
319 data.setRange(bytesRead, bytesRead + buffer.length, buffer); 320 data.setRange(bytesRead, bytesRead + buffer.length, buffer);
320 bytesRead += buffer.length; 321 bytesRead += buffer.length;
321 for (var value in buffer) { 322 for (var value in buffer) {
322 Expect.isTrue(value is int); 323 Expect.isTrue(value is int);
323 Expect.isTrue(value < 256 && value >= 0); 324 Expect.isTrue(value < 256 && value >= 0);
324 } 325 }
325 } 326 }
326 if (bytesRead == data.length) { 327 if (bytesRead == data.length) {
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 testSimpleConnectFail("not_a_nickname"); 461 testSimpleConnectFail("not_a_nickname");
461 testSimpleConnectFail("CN=notARealDistinguishedName"); 462 testSimpleConnectFail("CN=notARealDistinguishedName");
462 testServerListenAfterConnect(); 463 testServerListenAfterConnect();
463 testSimpleReadWrite(true, true, false); 464 testSimpleReadWrite(true, true, false);
464 testSimpleReadWrite(true, false, false); 465 testSimpleReadWrite(true, false, false);
465 testSimpleReadWrite(false, true, false); 466 testSimpleReadWrite(false, true, false);
466 testSimpleReadWrite(false, false, false); 467 testSimpleReadWrite(false, false, false);
467 testSimpleReadWrite(false, false, true, true); 468 testSimpleReadWrite(false, false, true, true);
468 testSimpleReadWrite(false, false, true, false); 469 testSimpleReadWrite(false, false, true, false);
469 } 470 }
OLDNEW
« no previous file with comments | « sdk/lib/io/secure_socket.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698