Index: pkg/watcher/test/utils.dart |
diff --git a/pkg/watcher/test/utils.dart b/pkg/watcher/test/utils.dart |
index 567bdb22102cf455d0fd43fa81ec94dfac1bea86..a7bd9b636234ba849a44155b07f6ff62a9f75a6a 100644 |
--- a/pkg/watcher/test/utils.dart |
+++ b/pkg/watcher/test/utils.dart |
@@ -15,6 +15,9 @@ import 'package:watcher/watcher.dart'; |
import 'package:watcher/src/stat.dart'; |
import 'package:watcher/src/utils.dart'; |
+// TODO(nweiz): remove this when issue 15042 is fixed. |
+import 'package:watcher/src/directory_watcher/mac_os.dart'; |
+ |
/// The path to the temporary sandbox created for each test. All file |
/// operations are implicitly relative to this directory. |
String _sandboxDir; |
@@ -115,6 +118,11 @@ Stream _watcherEvents; |
/// |
/// If [dir] is provided, watches a subdirectory in the sandbox with that name. |
void startWatcher({String dir}) { |
+ var testCase = currentTestCase.description; |
+ if (MacOSDirectoryWatcher.logDebugInfo) { |
+ print("starting watcher for $testCase"); |
+ } |
+ |
// We want to wait until we're ready *after* we subscribe to the watcher's |
// events. |
_watcher = createWatcher(dir: dir, waitForReady: false); |
@@ -128,6 +136,10 @@ void startWatcher({String dir}) { |
onError: currentSchedule.signalError); |
currentSchedule.onComplete.schedule(() { |
+ if (MacOSDirectoryWatcher.logDebugInfo) { |
+ print("stopping watcher for $testCase"); |
+ } |
+ |
var numEvents = _nextEvent; |
subscription.cancel(); |
_nextEvent = 0; |