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

Unified Diff: pkg/watcher/test/directory_watcher/mac_os_test.dart

Issue 134963007: Fix a flaky test and work around issue 16003 in pkg/watcher. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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
Index: pkg/watcher/test/directory_watcher/mac_os_test.dart
diff --git a/pkg/watcher/test/directory_watcher/mac_os_test.dart b/pkg/watcher/test/directory_watcher/mac_os_test.dart
index 43567f0e79c07850347940481c5b2924eebc6460..1e9bd7d1058366cd2798589629cc2dca141d7474 100644
--- a/pkg/watcher/test/directory_watcher/mac_os_test.dart
+++ b/pkg/watcher/test/directory_watcher/mac_os_test.dart
@@ -36,26 +36,25 @@ main() {
expectAddEvent("dir/newer.txt");
});
- // TODO(nweiz): re-enable this when issue 16003 is fixed.
- // test('emits events for many nested files moved out then immediately back in',
- // () {
- // withPermutations((i, j, k) =>
- // writeFile("dir/sub/sub-$i/sub-$j/file-$k.txt"));
-
- // startWatcher(dir: "dir");
-
- // renameDir("dir/sub", "sub");
- // renameDir("sub", "dir/sub");
-
- // allowEither(() {
- // inAnyOrder(withPermutations((i, j, k) =>
- // isRemoveEvent("dir/sub/sub-$i/sub-$j/file-$k.txt")));
-
- // inAnyOrder(withPermutations((i, j, k) =>
- // isAddEvent("dir/sub/sub-$i/sub-$j/file-$k.txt")));
- // }, () {
- // inAnyOrder(withPermutations((i, j, k) =>
- // isModifyEvent("dir/sub/sub-$i/sub-$j/file-$k.txt")));
- // });
- // });
+ test('emits events for many nested files moved out then immediately back in',
+ () {
+ withPermutations((i, j, k) =>
+ writeFile("dir/sub/sub-$i/sub-$j/file-$k.txt"));
+
+ startWatcher(dir: "dir");
+
+ renameDir("dir/sub", "sub");
+ renameDir("sub", "dir/sub");
+
+ allowEither(() {
+ inAnyOrder(withPermutations((i, j, k) =>
+ isRemoveEvent("dir/sub/sub-$i/sub-$j/file-$k.txt")));
+
+ inAnyOrder(withPermutations((i, j, k) =>
+ isAddEvent("dir/sub/sub-$i/sub-$j/file-$k.txt")));
+ }, () {
+ inAnyOrder(withPermutations((i, j, k) =>
+ isModifyEvent("dir/sub/sub-$i/sub-$j/file-$k.txt")));
+ });
+ });
}

Powered by Google App Engine
This is Rietveld 408576698