Chromium Code Reviews

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

Issue 1056733002: Run test tearDowns and clean up temporary directories when a signal is caught. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « lib/src/backend/invoker.dart ('k') | lib/src/backend/live_test_controller.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/backend/live_test.dart
diff --git a/lib/src/backend/live_test.dart b/lib/src/backend/live_test.dart
index 4b1697d76446b25824283cbe032b53af7b05c6f6..4cc917a5a4af3efb1dbcd30c8b87256600c23484 100644
--- a/lib/src/backend/live_test.dart
+++ b/lib/src/backend/live_test.dart
@@ -111,10 +111,16 @@ abstract class LiveTest {
/// Once [close] is called, [onComplete] will complete if it hasn't already
/// and [onStateChange] and [onError] will close immediately. This means that,
/// if the test was running at the time [close] is called, it will never emit
- /// a [Status.complete] state-change event.
+ /// a [Status.complete] state-change event. Once a test is closed, [expect]
+ /// and [expectAsync] will throw a [ClosedException] to help the test
+ /// terminate as quickly as possible.
///
/// This doesn't automatically happen after the test completes because there
/// may be more asynchronous work going on in the background that could
/// produce new errors.
+ ///
+ /// Returns a [Future] that completes once all resources are released *and*
+ /// the test has completed. This allows the caller to wait until the test's
+ /// tear-down logic has run.
Future close();
}
« no previous file with comments | « lib/src/backend/invoker.dart ('k') | lib/src/backend/live_test_controller.dart » ('j') | no next file with comments »

Powered by Google App Engine