From 2497865d0eed87b354a3af58c36c599395d6b181 Mon Sep 17 00:00:00 2001 From: lingjhf Date: Tue, 6 Oct 2026 14:14:15 +0800 Subject: [PATCH] test(windows): await workspace closure before deleting fixtures --- test/application_tools_test.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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);