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

Side by Side Diff: pkg/watcher/test/directory_watcher/mac_os_test.dart

Issue 129473003: Use stream matchers to unflake the mac OS watcher tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Mark a single test case as failing 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 20 matching lines...) Expand all
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 test('emits events for many nested files moved out then immediately back in', 39 test('emits events for many nested files moved out then immediately back in',
40 () { 40 () {
41 // TODO(nweiz): re-enable this when issue 16003 is fixed.
42 return;
Bob Nystrom 2014/01/09 22:49:20 I think this generates an unreachable code warning
nweiz 2014/01/10 01:05:31 Done.
43
41 withPermutations((i, j, k) => 44 withPermutations((i, j, k) =>
42 writeFile("dir/sub/sub-$i/sub-$j/file-$k.txt")); 45 writeFile("dir/sub/sub-$i/sub-$j/file-$k.txt"));
43 46
44 startWatcher(dir: "dir"); 47 startWatcher(dir: "dir");
45 48
46 renameDir("dir/sub", "sub"); 49 renameDir("dir/sub", "sub");
47 renameDir("sub", "dir/sub"); 50 renameDir("sub", "dir/sub");
48 51
49 inAnyOrder(() { 52 allowEither(() {
50 withPermutations((i, j, k) => 53 inAnyOrder(withPermutations((i, j, k) =>
51 expectRemoveEvent("dir/sub/sub-$i/sub-$j/file-$k.txt")); 54 isRemoveEvent("dir/sub/sub-$i/sub-$j/file-$k.txt")));
52 });
53 55
54 inAnyOrder(() { 56 inAnyOrder(withPermutations((i, j, k) =>
55 withPermutations((i, j, k) => 57 isAddEvent("dir/sub/sub-$i/sub-$j/file-$k.txt")));
56 expectAddEvent("dir/sub/sub-$i/sub-$j/file-$k.txt")); 58 }, () {
59 inAnyOrder(withPermutations((i, j, k) =>
60 isModifyEvent("dir/sub/sub-$i/sub-$j/file-$k.txt")));
57 }); 61 });
58 }); 62 });
59 } 63 }
OLDNEW
« no previous file with comments | « pkg/watcher/test/directory_watcher/linux_test.dart ('k') | pkg/watcher/test/directory_watcher/shared.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698