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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'package:scheduled_test/scheduled_test.dart'; 5 import 'package:scheduled_test/scheduled_test.dart';
6 import 'package:watcher/src/directory_watcher/mac_os.dart'; 6 import 'package:watcher/src/directory_watcher/mac_os.dart';
7 import 'package:watcher/watcher.dart'; 7 import 'package:watcher/watcher.dart';
8 8
9 import 'shared.dart'; 9 import 'shared.dart';
10 import '../utils.dart'; 10 import '../utils.dart';
(...skipping 18 matching lines...) Expand all
29 createDir("dir"); 29 createDir("dir");
30 writeFile("dir/old.txt"); 30 writeFile("dir/old.txt");
31 deleteDir("dir"); 31 deleteDir("dir");
32 createDir("dir"); 32 createDir("dir");
33 33
34 startWatcher(dir: "dir"); 34 startWatcher(dir: "dir");
35 writeFile("dir/newer.txt"); 35 writeFile("dir/newer.txt");
36 expectAddEvent("dir/newer.txt"); 36 expectAddEvent("dir/newer.txt");
37 }); 37 });
38 38
39 // TODO(nweiz): re-enable this when issue 16003 is fixed. 39 test('emits events for many nested files moved out then immediately back in',
40 // test('emits events for many nested files moved out then immediately back in ', 40 () {
41 // () { 41 withPermutations((i, j, k) =>
42 // withPermutations((i, j, k) => 42 writeFile("dir/sub/sub-$i/sub-$j/file-$k.txt"));
43 // writeFile("dir/sub/sub-$i/sub-$j/file-$k.txt"));
44 43
45 // startWatcher(dir: "dir"); 44 startWatcher(dir: "dir");
46 45
47 // renameDir("dir/sub", "sub"); 46 renameDir("dir/sub", "sub");
48 // renameDir("sub", "dir/sub"); 47 renameDir("sub", "dir/sub");
49 48
50 // allowEither(() { 49 allowEither(() {
51 // inAnyOrder(withPermutations((i, j, k) => 50 inAnyOrder(withPermutations((i, j, k) =>
52 // isRemoveEvent("dir/sub/sub-$i/sub-$j/file-$k.txt"))); 51 isRemoveEvent("dir/sub/sub-$i/sub-$j/file-$k.txt")));
53 52
54 // inAnyOrder(withPermutations((i, j, k) => 53 inAnyOrder(withPermutations((i, j, k) =>
55 // isAddEvent("dir/sub/sub-$i/sub-$j/file-$k.txt"))); 54 isAddEvent("dir/sub/sub-$i/sub-$j/file-$k.txt")));
56 // }, () { 55 }, () {
57 // inAnyOrder(withPermutations((i, j, k) => 56 inAnyOrder(withPermutations((i, j, k) =>
58 // isModifyEvent("dir/sub/sub-$i/sub-$j/file-$k.txt"))); 57 isModifyEvent("dir/sub/sub-$i/sub-$j/file-$k.txt")));
59 // }); 58 });
60 // }); 59 });
61 } 60 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698