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

Unified Diff: lib/src/backend/invoker.dart

Issue 2099503002: Add a dedicated Result for skipped tests. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes 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 | « json_reporter.schema.json ('k') | lib/src/backend/state.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/backend/invoker.dart
diff --git a/lib/src/backend/invoker.dart b/lib/src/backend/invoker.dart
index 9d92eb14ca1f8fb2a4b6214c48fae3351dfb7cd5..f68172033f68dbe1db31d5483a4f9f2cba1a7846 100644
--- a/lib/src/backend/invoker.dart
+++ b/lib/src/backend/invoker.dart
@@ -234,8 +234,8 @@ class Invoker {
void _handleError(error, [StackTrace stackTrace]) {
if (stackTrace == null) stackTrace = new Chain.current();
- var afterSuccess = liveTest.isComplete &&
- liveTest.state.result == Result.success;
+ // Store this here because it'll change when we set the state below.
+ var shouldBeDone = liveTest.state.shouldBeDone;
if (error is! TestFailure) {
_controller.setState(const State(Status.complete, Result.error));
@@ -246,9 +246,9 @@ class Invoker {
_controller.addError(error, stackTrace);
removeAllOutstandingCallbacks();
- // If a test was marked as success but then had an error, that indicates
+ // If a test was supposed to be done but then had an error, that indicates
// that it was poorly-written and could be flaky.
- if (!afterSuccess) return;
+ if (!shouldBeDone) return;
// However, users don't think of load tests as "tests", so the error isn't
// helpful for them.
« no previous file with comments | « json_reporter.schema.json ('k') | lib/src/backend/state.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698