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

Side by Side Diff: sdk/lib/_internal/pub/test/serve/utils.dart

Issue 149063005: Increase the timeout for a failing pub test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 | sdk/lib/_internal/pub/test/transformer/dart2js/converts_isolate_entrypoint_in_web_test.dart » ('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 d.file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS d.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 library pub_tests; 5 library pub_tests;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 import 'dart:io'; 9 import 'dart:io';
10 10
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 /// 99 ///
100 /// Returns the `pub serve` process. 100 /// Returns the `pub serve` process.
101 ScheduledProcess startPubServe([Iterable<String> args]) { 101 ScheduledProcess startPubServe([Iterable<String> args]) {
102 // Use port 0 to get an ephemeral port. 102 // Use port 0 to get an ephemeral port.
103 var pubArgs = ["serve", "--port=0", "--hostname=127.0.0.1", "--force-poll"]; 103 var pubArgs = ["serve", "--port=0", "--hostname=127.0.0.1", "--force-poll"];
104 104
105 if (args != null) pubArgs.addAll(args); 105 if (args != null) pubArgs.addAll(args);
106 106
107 // Dart2js can take a long time to compile dart code, so we increase the 107 // Dart2js can take a long time to compile dart code, so we increase the
108 // timeout to cope with that. 108 // timeout to cope with that.
109 currentSchedule.timeout = new Duration(seconds: 15); 109 currentSchedule.timeout *= 1.5;
110 110
111 return startPub(args: pubArgs); 111 return startPub(args: pubArgs);
112 } 112 }
113 113
114 /// Schedules starting the "pub serve" process and records its port number for 114 /// Schedules starting the "pub serve" process and records its port number for
115 /// future requests. 115 /// future requests.
116 /// 116 ///
117 /// If [shouldGetFirst] is `true`, validates that pub get is run first. In that 117 /// If [shouldGetFirst] is `true`, validates that pub get is run first. In that
118 /// case, you can also pass [numDownloads] to specify how many packages should 118 /// case, you can also pass [numDownloads] to specify how many packages should
119 /// be downloaded during the get. 119 /// be downloaded during the get.
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 /// socket. It omitted, request is JSON encoded to a string first. 240 /// socket. It omitted, request is JSON encoded to a string first.
241 void webSocketShouldReply(request, expectation, {bool encodeRequest: true}) { 241 void webSocketShouldReply(request, expectation, {bool encodeRequest: true}) {
242 schedule(() => _ensureWebSocket().then((_) { 242 schedule(() => _ensureWebSocket().then((_) {
243 if (encodeRequest) request = JSON.encode(request); 243 if (encodeRequest) request = JSON.encode(request);
244 _webSocket.add(request); 244 _webSocket.add(request);
245 return _webSocketBroadcastStream.first.then((value) { 245 return _webSocketBroadcastStream.first.then((value) {
246 expect(JSON.decode(value), expectation); 246 expect(JSON.decode(value), expectation);
247 }); 247 });
248 }), "send $request to web socket and expect reply that $expectation"); 248 }), "send $request to web socket and expect reply that $expectation");
249 } 249 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/test/transformer/dart2js/converts_isolate_entrypoint_in_web_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698