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

Unified 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, 6 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 | « no previous file | no next file » | 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 1d2ea9d54dec24b1ab974940b3970138cb865a76..0e8b6e932af424b757e26dcf039252d1c5dd47f0 100644
--- a/runtime/observatory/tests/service/test_helper.dart
+++ b/runtime/observatory/tests/service/test_helper.dart
@@ -310,7 +310,14 @@ class _ServiceTesterRunner {
await process.requestExit();
}, onError: (e, st) {
process.requestExit();
- if (!_isWebSocketDisconnect(e)) {
+ // TODO: remove this workaround.
+ // This is necessary due to non awaited operations.
+ // E.G. object.dart (398~402)
+ // When an exception is thrown inside a test (directly or via await) the
+ // stacktrace is non-null and shows where the exception has been thrown.
+ // If vice versa the exception is due to an error in a non-awaited
+ // Future the stacktrace is null.
+ if (st != null || !_isWebSocketDisconnect(e)) {
print('Unexpected exception in service tests: $e $st');
throw e;
}
« 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