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

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

Issue 23589004: Increase timeout for http_response_deadline_test, to make it stable on DebugSIMARM. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix status file. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/standalone/standalone.status » ('j') | 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";
11 import "dart:async"; 11 import "dart:async";
12 import "dart:io"; 12 import "dart:io";
13 13
14 void testSimpleDeadline(int connections) { 14 void testSimpleDeadline(int connections) {
15 HttpServer.bind('localhost', 0).then((server) { 15 HttpServer.bind('localhost', 0).then((server) {
16 server.listen((request) { 16 server.listen((request) {
17 request.response.deadline = const Duration(seconds: 10); 17 request.response.deadline = const Duration(seconds: 1000);
18 request.response.write("stuff"); 18 request.response.write("stuff");
19 request.response.close(); 19 request.response.close();
20 }); 20 });
21 21
22 var futures = []; 22 var futures = [];
23 var client = new HttpClient(); 23 var client = new HttpClient();
24 for (int i = 0; i < connections; i++) { 24 for (int i = 0; i < connections; i++) {
25 futures.add(client.get('localhost', server.port, '/') 25 futures.add(client.get('localhost', server.port, '/')
26 .then((request) => request.close()) 26 .then((request) => request.close())
27 .then((response) => response.drain())); 27 .then((response) => response.drain()));
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 Future.wait(futures).then((_) => server.close()); 83 Future.wait(futures).then((_) => server.close());
84 }); 84 });
85 } 85 }
86 86
87 void main() { 87 void main() {
88 testSimpleDeadline(10); 88 testSimpleDeadline(10);
89 testExceedDeadline(10); 89 testExceedDeadline(10);
90 testDeadlineAndDetach(10); 90 testDeadlineAndDetach(10);
91 } 91 }
92 92
OLDNEW
« no previous file with comments | « no previous file | tests/standalone/standalone.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698