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

Unified Diff: pkg/front_end/test/physical_file_system_test.dart

Issue 2498613002: Fix windows bot failure in physical_file_system_test.dart. (Closed)
Patch Set: Created 4 years, 1 month 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/front_end/test/physical_file_system_test.dart
diff --git a/pkg/front_end/test/physical_file_system_test.dart b/pkg/front_end/test/physical_file_system_test.dart
index 5c07a8c7c6a97dd2a1366e8d90908d76a296b239..859e998a58f0ba7f09494fd6dd990393b4c3e69c 100644
--- a/pkg/front_end/test/physical_file_system_test.dart
+++ b/pkg/front_end/test/physical_file_system_test.dart
@@ -5,6 +5,7 @@
library front_end.test.physical_file_system_test;
+import 'dart:async';
import 'dart:convert';
import 'dart:io' as io;
@@ -206,7 +207,15 @@ class _BaseTest {
tempPath = tempDirectory.absolute.path;
}
- tearDown() {
- tempDirectory.deleteSync(recursive: true);
+ tearDown() async {
+ try {
+ tempDirectory.deleteSync(recursive: true);
+ } on io.FileSystemException {
+ // Sometimes on Windows the delete fails with errno 32
+ // (ERROR_SHARING_VIOLATION: The process cannot access the file because it
+ // is being used by another process). Wait 1 second and try again.
+ await new Future.delayed(new Duration(seconds: 1));
+ tempDirectory.deleteSync(recursive: true);
+ }
}
}
« 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