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

Side by Side Diff: runtime/observatory/tests/service/test_helper.dart

Issue 2093703002: Avoid to mask all the NetworkRpcException (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Added explanation for added condition Created 4 years, 5 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
« no previous file with comments | « no previous file | 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 library test_helper; 5 library test_helper;
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 import 'package:observatory/service_io.dart'; 10 import 'package:observatory/service_io.dart';
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 vm.verbose = verbose_vm; 303 vm.verbose = verbose_vm;
304 print('Running $name [$testIndex/$totalTests]'); 304 print('Running $name [$testIndex/$totalTests]');
305 testIndex++; 305 testIndex++;
306 await test(isolate); 306 await test(isolate);
307 } 307 }
308 } 308 }
309 309
310 await process.requestExit(); 310 await process.requestExit();
311 }, onError: (e, st) { 311 }, onError: (e, st) {
312 process.requestExit(); 312 process.requestExit();
313 if (!_isWebSocketDisconnect(e)) { 313 // TODO: remove this workaround.
314 // This is necessary due to non awaited operations.
315 // E.G. object.dart (398~402)
316 // When an exception is thrown inside a test (directly or via await) the
317 // stacktrace is non-null and shows where the exception has been thrown.
318 // If vice versa the exception is due to an error in a non-awaited
319 // Future the stacktrace is null.
320 if (st != null || !_isWebSocketDisconnect(e)) {
314 print('Unexpected exception in service tests: $e $st'); 321 print('Unexpected exception in service tests: $e $st');
315 throw e; 322 throw e;
316 } 323 }
317 }); 324 });
318 }); 325 });
319 } 326 }
320 } 327 }
321 328
322 /// Runs [tests] in sequence, each of which should take an [Isolate] and 329 /// Runs [tests] in sequence, each of which should take an [Isolate] and
323 /// return a [Future]. Code for setting up state can run before and/or 330 /// return a [Future]. Code for setting up state can run before and/or
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 mainArgs: mainArgs, 422 mainArgs: mainArgs,
416 vmTests: tests, 423 vmTests: tests,
417 pause_on_start: pause_on_start, 424 pause_on_start: pause_on_start,
418 pause_on_exit: pause_on_exit, 425 pause_on_exit: pause_on_exit,
419 trace_service: trace_service, 426 trace_service: trace_service,
420 trace_compiler: trace_compiler, 427 trace_compiler: trace_compiler,
421 verbose_vm: verbose_vm, 428 verbose_vm: verbose_vm,
422 pause_on_unhandled_exceptions: pause_on_unhandled_exceptions); 429 pause_on_unhandled_exceptions: pause_on_unhandled_exceptions);
423 } 430 }
424 } 431 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698