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

Side by Side Diff: pkg/analysis_server/test/timing/timing_framework.dart

Issue 668953002: Add an integration test to verify that server I/O is asynchronous. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library test.timing; 5 library test.timing;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 import 'dart:math'; 9 import 'dart:math';
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 * Perform any operations that need to be performed once before any iterations . 82 * Perform any operations that need to be performed once before any iterations .
83 */ 83 */
84 Future oneTimeSetUp() { 84 Future oneTimeSetUp() {
85 initializeInttestMixin(); 85 initializeInttestMixin();
86 server = new Server(); 86 server = new Server();
87 sourceDirectory = Directory.systemTemp.createTempSync('analysisServer'); 87 sourceDirectory = Directory.systemTemp.createTempSync('analysisServer');
88 Completer serverConnected = new Completer(); 88 Completer serverConnected = new Completer();
89 onServerConnected.listen((_) { 89 onServerConnected.listen((_) {
90 serverConnected.complete(); 90 serverConnected.complete();
91 }); 91 });
92 return server.start(dispatchNotification).then((params) { 92 return server.start().then((params) {
93 server.listenToOutput(dispatchNotification);
93 server.exitCode.then((_) { 94 server.exitCode.then((_) {
94 skipShutdown = true; 95 skipShutdown = true;
95 }); 96 });
96 return serverConnected.future; 97 return serverConnected.future;
97 }); 98 });
98 } 99 }
99 100
100 /** 101 /**
101 * Perform any operations that need to be performed before each iteration. 102 * Perform any operations that need to be performed before each iteration.
102 */ 103 */
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 */ 310 */
310 List<int> toMilliseconds(List<int> times) { 311 List<int> toMilliseconds(List<int> times) {
311 int count = times.length; 312 int count = times.length;
312 List<int> convertedValues = new List<int>(); 313 List<int> convertedValues = new List<int>();
313 for (int i = 0; i < count; i++) { 314 for (int i = 0; i < count; i++) {
314 convertedValues.add(times[i] ~/ NANOSECONDS_PER_MILLISECOND); 315 convertedValues.add(times[i] ~/ NANOSECONDS_PER_MILLISECOND);
315 } 316 }
316 return convertedValues; 317 return convertedValues;
317 } 318 }
318 } 319 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698