From 6010aa908bf3d7280747d581285fa22682d09514 Mon Sep 17 00:00:00 2001 From: RyuJongJin <266630912+RyuJongJin@users.noreply.github.com> Date: Sat, 10 Oct 2026 00:13:35 +0900 Subject: [PATCH] =?UTF-8?q?explorer=5Ftest:=20tearDown=20=EC=9D=98=20?= =?UTF-8?q?=EC=9E=84=EC=8B=9C=20=ED=8F=B4=EB=8D=94=20=EC=A7=80=EC=9A=B0?= =?UTF-8?q?=EA=B8=B0=EB=A5=BC=20=EB=90=A0=20=EB=95=8C=EA=B9=8C=EC=A7=80=20?= =?UTF-8?q?=EA=B8=B0=EB=8B=A4=EB=A6=AC=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Windows 에서 방금 닫은 파일 (65 의 잠금 시험) 이나 색인 · 백신이 잠깐 잡고 있으면 지우기가 실패할 수 있다. 100ms 씩 최대 약 5초 다시 지운다. (65 만 20번 연달아 돌려 모두 통과 - 실패는 재현되지 않음) Co-Authored-By: Claude Opus 5.5 --- test/explorer_test.dart | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/test/explorer_test.dart b/test/explorer_test.dart index 20cba20..d4c0888 100644 --- a/test/explorer_test.dart +++ b/test/explorer_test.dart @@ -44,7 +44,18 @@ void main() { mediaTool: ProcessMediaTool('x', 'y'), storage: DesktopStorageService(), shell: shell)); c.settings.explorerPaths = [left, right]; }); - tearDown(() => tmp.deleteSync(recursive: true)); + // Windows: 방금 닫은 파일 (65 의 잠금 시험) 이나 색인 · 백신이 잠깐 잡고 있으면 지우기가 실패한다 - 될 때까지 기다린다 + tearDown(() async { + for (var i = 0;; i++) { + try { + if (tmp.existsSync()) tmp.deleteSync(recursive: true); + return; + } on FileSystemException { + if (i >= 50) rethrow; + await Future.delayed(const Duration(milliseconds: 100)); + } + } + }); Future open(WidgetTester tester) async { tester.view.physicalSize = const Size(1600, 900);