fix a test flake on appveyor (#16479)

* fix a test flake on appveyor

* only catch FileSystemExceptions
This commit is contained in:
Devon Carew
2018-04-12 15:07:51 -07:00
committed by GitHub
parent 910417cca4
commit a561722b2b
3 changed files with 12 additions and 3 deletions

View File

@@ -33,7 +33,12 @@ void main() {
});
tearDownAll(() {
tempDir?.deleteSync(recursive: true);
try {
tempDir?.deleteSync(recursive: true);
} on FileSystemException catch (e) {
// ignore errors deleting the temporary directory
print('Ignored exception during tearDown: $e');
}
});
// Create a project to be analyzed

View File

@@ -42,7 +42,12 @@ void main() {
});
tearDown(() {
temp.deleteSync(recursive: true);
try {
temp.deleteSync(recursive: true);
} on FileSystemException catch (e) {
// ignore errors deleting the temporary directory
print('Ignored exception during tearDown: $e');
}
});
// Verify that we create a project that is well-formed.

View File

@@ -46,7 +46,6 @@ void main() {
temp.deleteSync(recursive: true);
});
testUsingContext('in project', () async {
final String projectPath = await createProject(temp);
expect(findProjectRoot(projectPath), projectPath);