From 5cdf57d7ff6833595fa973f3b687f1e615cdf1f2 Mon Sep 17 00:00:00 2001 From: RyuJongJin <266630912+RyuJongJin@users.noreply.github.com> Date: Sat, 17 Oct 2026 13:19:23 +0900 Subject: [PATCH] =?UTF-8?q?WIP=20=EC=8B=9C=ED=97=98=20=ED=9D=94=EB=93=A4?= =?UTF-8?q?=EB=A6=BC:=20batch=5Ftest=20239=20(=EC=B7=A8=EC=86=8C=20?= =?UTF-8?q?=EC=B0=BD=20=C2=B7=20=EC=A7=80=EA=B8=88=20=EA=B2=83=EB=A7=8C=20?= =?UTF-8?q?=EC=B7=A8=EC=86=8C)=20-=20=EC=A0=95=ED=95=B4=EC=A7=84=20?= =?UTF-8?q?=ED=9A=9F=EC=88=98=20=EB=8C=80=EC=8B=A0=20=EB=90=A0=20=EB=95=8C?= =?UTF-8?q?=EA=B9=8C=EC=A7=80=20=EA=B8=B0=EB=8B=A4=EB=A6=AC=EA=B8=B0=20(?= =?UTF-8?q?=EA=B2=80=ED=86=A0=20=EB=8C=80=EA=B8=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 관리자 지적: 전체 시험 중 한 번 실패 (따로 돌리면 통과). 실제 FFmpeg 인코딩을 4초 · 20초 안에 기다리던 것이 PC 가 바쁠 때 넘쳤다. 조건이 될 때까지 (최대 90초) 기다리고, 시험 시간 한도를 4분으로. Co-Authored-By: Claude Opus 5.5 --- test/batch_test.dart | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/test/batch_test.dart b/test/batch_test.dart index 2c39d2a..c339c9e 100644 --- a/test/batch_test.dart +++ b/test/batch_test.dart @@ -371,15 +371,19 @@ void main() { await c.addVideos(files); final [v1, v2, v3] = c.videos; final building = c.buildVideos([v1, v2, v3]); - for (var i = 0; i < 400 && v1.status != JobStatus.running; i++) { - await Future.delayed(const Duration(milliseconds: 10)); + // 관리자 지적 (10/17): 전체 시험 중 PC 가 바쁘면 정해진 횟수 (4초 · 20초) 안에 오지 않아 한 번 실패했다 - 될 때까지 (넉넉히) 기다린다 + Future until(bool Function() ok, {Duration max = const Duration(seconds: 90)}) async { + final end = DateTime.now().add(max); + while (!ok() && DateTime.now().isBefore(end)) { + await Future.delayed(const Duration(milliseconds: 20)); + } } + + await until(() => v1.status == JobStatus.running); final shown = c.runningVideos; // 창을 연 때: v1 expect(shown, [v1]); // 창을 보는 사이 v1 이 끝나고 v2 가 시작 - for (var i = 0; i < 800 && !(v2.status == JobStatus.running && v2.progress > 0.01); i++) { - await Future.delayed(const Duration(milliseconds: 25)); - } + await until(() => v2.status == JobStatus.running && v2.progress > 0.01); expect([v1.status, v2.status], [JobStatus.done, JobStatus.running]); expect(c.cancelVideos(shown), [v1], reason: '이미 끝남 - 알리고 다시 묻는다'); await Future.delayed(const Duration(milliseconds: 500)); @@ -389,7 +393,7 @@ void main() { await building; expect([v1.status, v2.status, v3.status], [JobStatus.done, JobStatus.cancelled, JobStatus.done], reason: '${v1.message} ${v2.message} ${v3.message}'); - }); + }, timeout: const Timeout(Duration(minutes: 4))); testWidgets('198: 원어를 자동 감지한 동영상은 세부 정보에 감지한 언어 · [다른 언어로 다시] (알림을 놓쳐도)', (tester) async { tester.view.physicalSize = const Size(1600, 900);