Unverified Commit a561722b authored by Devon Carew's avatar Devon Carew Committed by GitHub

fix a test flake on appveyor (#16479)

* fix a test flake on appveyor

* only catch FileSystemExceptions
parent 910417cc
...@@ -33,7 +33,12 @@ void main() { ...@@ -33,7 +33,12 @@ void main() {
}); });
tearDownAll(() { 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 // Create a project to be analyzed
......
...@@ -42,7 +42,12 @@ void main() { ...@@ -42,7 +42,12 @@ void main() {
}); });
tearDown(() { 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. // Verify that we create a project that is well-formed.
......
...@@ -46,7 +46,6 @@ void main() { ...@@ -46,7 +46,6 @@ void main() {
temp.deleteSync(recursive: true); temp.deleteSync(recursive: true);
}); });
testUsingContext('in project', () async { testUsingContext('in project', () async {
final String projectPath = await createProject(temp); final String projectPath = await createProject(temp);
expect(findProjectRoot(projectPath), projectPath); expect(findProjectRoot(projectPath), projectPath);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment