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

Unified Diff: test/test_pub.dart

Issue 1226083002: Fix several Windows issues. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Remove CR LF fixes. Created 5 years, 5 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 | « test/run/forwards_signal_posix_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/test_pub.dart
diff --git a/test/test_pub.dart b/test/test_pub.dart
index 05429792254d48b46503840b0c16a3b2e4be2d1a..8dcebc7940d8251bd0dab66d071ee4936da139d5 100644
--- a/test/test_pub.dart
+++ b/test/test_pub.dart
@@ -381,8 +381,16 @@ void _integration(String description, void body(), [Function testFn]) {
testFn(description, () {
_sandboxDir = createSystemTempDir();
d.defaultRoot = sandboxDir;
- currentSchedule.onComplete.schedule(() => deleteEntry(_sandboxDir),
- 'deleting the sandbox directory');
+ currentSchedule.onComplete.schedule(() {
+ try {
+ deleteEntry(_sandboxDir);
+ } on ApplicationException catch (_) {
+ // Silently swallow exceptions on Windows. If the test failed, there may
+ // still be lingering processes that have files in the sandbox open,
+ // which will cause this to fail on Windows.
+ if (!Platform.isWindows) rethrow;
+ }
+ }, 'deleting the sandbox directory');
// Schedule the test.
body();
« no previous file with comments | « test/run/forwards_signal_posix_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698