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

Unified Diff: runtime/observatory/tests/service/test_helper.dart

Issue 2691213003: Reland improvements to causal async stack traces (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/observatory/tests/service/causal_async_star_stack_contents_test.dart ('k') | runtime/vm/debugger.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/tests/service/test_helper.dart
diff --git a/runtime/observatory/tests/service/test_helper.dart b/runtime/observatory/tests/service/test_helper.dart
index e1f43af87aaf206766376a74a43ca944456440b5..ca1e5afa8752593ba71a39565b08f838fc038e33 100644
--- a/runtime/observatory/tests/service/test_helper.dart
+++ b/runtime/observatory/tests/service/test_helper.dart
@@ -8,7 +8,6 @@ import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:observatory/service_io.dart';
-import 'package:stack_trace/stack_trace.dart';
import 'service_test_common.dart';
/// Will be set to the http address of the VM's service protocol before
@@ -282,19 +281,19 @@ class _ServiceTesterRunner {
bool useAuthToken: false}) {
var process = new _ServiceTesteeLauncher();
bool testsDone = false;
- process.launch(pause_on_start, pause_on_exit,
+ runZoned(() {
+ process.launch(pause_on_start, pause_on_exit,
pause_on_unhandled_exceptions,
testeeControlsServer,
useAuthToken, extraArgs).then((Uri serverAddress) async {
- if (mainArgs.contains("--gdb")) {
- var pid = process.process.pid;
- var wait = new Duration(seconds: 10);
- print("Testee has pid $pid, waiting $wait before continuing");
- sleep(wait);
- }
- setupAddresses(serverAddress);
- var name = Platform.script.pathSegments.last;
- Chain.capture(() async {
+ if (mainArgs.contains("--gdb")) {
+ var pid = process.process.pid;
+ var wait = new Duration(seconds: 10);
+ print("Testee has pid $pid, waiting $wait before continuing");
+ sleep(wait);
+ }
+ setupAddresses(serverAddress);
+ var name = Platform.script.pathSegments.last;
var vm =
new WebSocketVM(new WebSocketVMTarget(serviceWebsocketAddress));
print('Loading VM...');
@@ -329,21 +328,20 @@ class _ServiceTesterRunner {
print('All service tests completed successfully.');
testsDone = true;
await process.requestExit();
- }, onError: (error, stackTrace) {
- if (testsDone) {
- print('Ignoring late exception during process exit:\n'
- '$error\n#stackTrace');
- } else {
- process.requestExit();
- print('Unexpected exception in service tests: $error\n$stackTrace');
- throw error;
- }
});
+ }, onError: (error, stackTrace) async {
+ print('onERROR FIRED!');
+ if (testsDone) {
+ print('Ignoring late exception during process exit:\n'
+ '$error\n#stackTrace');
+ } else {
+ await process.requestExit();
+ print('Unexpected exception in service tests: $error\n$stackTrace');
+ throw error;
+ }
});
}
-
-
Future<Isolate> getFirstIsolate(WebSocketVM vm) async {
if (vm.isolates.isNotEmpty) {
var isolate = await vm.isolates.first.load();
« no previous file with comments | « runtime/observatory/tests/service/causal_async_star_stack_contents_test.dart ('k') | runtime/vm/debugger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698