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

Unified Diff: lib/src/live_test.dart

Issue 914963003: Add a VmListener and IsolateTest class for running tests in other isolates. (Closed) Base URL: git@github.com:dart-lang/unittest@master
Patch Set: Code review changes Created 5 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 | « lib/src/isolate_test.dart ('k') | lib/src/live_test_controller.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/live_test.dart
diff --git a/lib/src/live_test.dart b/lib/src/live_test.dart
index 646f5de169a18774652b45126168cc19b77bdcaa..1bb97573e4ee38a92fa01d7288d328bd152fdc35 100644
--- a/lib/src/live_test.dart
+++ b/lib/src/live_test.dart
@@ -101,4 +101,17 @@ abstract class LiveTest {
/// This returns the same [Future] as [onComplete]. It may not be called more
/// than once.
Future run();
+
+ /// Signals that this test should stop emitting events and release any
+ /// resources it may have allocated.
+ ///
+ /// 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.
+ ///
+ /// 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.
+ Future close();
}
« no previous file with comments | « lib/src/isolate_test.dart ('k') | lib/src/live_test_controller.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698