diff --git a/test/application_tools_test.dart b/test/application_tools_test.dart index b304354..395c6fe 100644 --- a/test/application_tools_test.dart +++ b/test/application_tools_test.dart @@ -126,9 +126,10 @@ void main() { .closeSource(); } await access.dispose(); - // UI/provider disposal owns the project; allow its async cleanup to finish. + // Provider disposal starts async cleanup without waiting for it. Close the + // workspace explicitly before deleting files, especially on Windows. + await container.read(projectsProvider.notifier).prepareToQuit(); container.dispose(); - await Future.delayed(const Duration(milliseconds: 50)); await root.delete(recursive: true); messenger.setMockMethodCallHandler(native, null); messenger.setMockMethodCallHandler(events, null);