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

Unified Diff: pkg/analyzer/test/file_system/physical_resource_provider_test.dart

Issue 840363002: Fix flakiness in physical_resource_provider_test (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/file_system/physical_resource_provider_test.dart
diff --git a/pkg/analyzer/test/file_system/physical_resource_provider_test.dart b/pkg/analyzer/test/file_system/physical_resource_provider_test.dart
index 0590cec6c510cd51ac2c1c5aded61e0262c985f7..c1c09ca753ca501453939a62280dd645b0d296d5 100644
--- a/pkg/analyzer/test/file_system/physical_resource_provider_test.dart
+++ b/pkg/analyzer/test/file_system/physical_resource_provider_test.dart
@@ -68,9 +68,16 @@ main() {
var path = join(tempPath, 'foo');
new io.File(path).writeAsStringSync('contents');
return delayed(() {
- expect(changesReceived, hasLength(1));
+ // There should be an "add" event indicating that the file was added.
+ // Depending on how long it took to write the contents, it may be
+ // followed by "modify" events.
+ expect(changesReceived, isNotEmpty);
expect(changesReceived[0].type, equals(ChangeType.ADD));
expect(changesReceived[0].path, equals(path));
+ for (int i = 1; i < changesReceived.length; i++) {
+ expect(changesReceived[i].type, equals(ChangeType.MODIFY));
+ expect(changesReceived[i].path, equals(path));
+ }
});
}));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698