diff --git a/packages/flutter_tools/test/commands/analyze_once_test.dart b/packages/flutter_tools/test/commands/analyze_once_test.dart index 7de75b8f4c..8f409551ab 100644 --- a/packages/flutter_tools/test/commands/analyze_once_test.dart +++ b/packages/flutter_tools/test/commands/analyze_once_test.dart @@ -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 diff --git a/packages/flutter_tools/test/commands/create_test.dart b/packages/flutter_tools/test/commands/create_test.dart index 5c1e2d4931..dfa49b0513 100644 --- a/packages/flutter_tools/test/commands/create_test.dart +++ b/packages/flutter_tools/test/commands/create_test.dart @@ -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. diff --git a/packages/flutter_tools/test/commands/upgrade_test.dart b/packages/flutter_tools/test/commands/upgrade_test.dart index 8764af8793..b5be173823 100644 --- a/packages/flutter_tools/test/commands/upgrade_test.dart +++ b/packages/flutter_tools/test/commands/upgrade_test.dart @@ -46,7 +46,6 @@ void main() { temp.deleteSync(recursive: true); }); - testUsingContext('in project', () async { final String projectPath = await createProject(temp); expect(findProjectRoot(projectPath), projectPath);