WIP 시험 흔들림: batch_test 239 (취소 창 · 지금 것만 취소) - 정해진 횟수 대신 될 때까지 기다리기 (검토 대기)

- 관리자 지적: 전체 시험 중 한 번 실패 (따로 돌리면 통과). 실제 FFmpeg 인코딩을 4초 · 20초 안에 기다리던 것이
  PC 가 바쁠 때 넘쳤다. 조건이 될 때까지 (최대 90초) 기다리고, 시험 시간 한도를 4분으로.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
묶음6
RyuJongJin 2026-10-17 13:19:23 +09:00
parent 58380e4ae0
commit 5cdf57d7ff
1 changed files with 10 additions and 6 deletions

View File

@ -371,15 +371,19 @@ void main() {
await c.addVideos(files); await c.addVideos(files);
final [v1, v2, v3] = c.videos; final [v1, v2, v3] = c.videos;
final building = c.buildVideos([v1, v2, v3]); final building = c.buildVideos([v1, v2, v3]);
for (var i = 0; i < 400 && v1.status != JobStatus.running; i++) { // 관리자 지적 (10/17): 전체 시험 중 PC 가 바쁘면 정해진 횟수 (4초 · 20초) 안에 오지 않아 한 번 실패했다 - 될 때까지 (넉넉히) 기다린다
await Future<void>.delayed(const Duration(milliseconds: 10)); Future<void> 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<void>.delayed(const Duration(milliseconds: 20));
}
} }
await until(() => v1.status == JobStatus.running);
final shown = c.runningVideos; // 창을 연 때: v1 final shown = c.runningVideos; // 창을 연 때: v1
expect(shown, [v1]); expect(shown, [v1]);
// 창을 보는 사이 v1 이 끝나고 v2 가 시작 // 창을 보는 사이 v1 이 끝나고 v2 가 시작
for (var i = 0; i < 800 && !(v2.status == JobStatus.running && v2.progress > 0.01); i++) { await until(() => v2.status == JobStatus.running && v2.progress > 0.01);
await Future<void>.delayed(const Duration(milliseconds: 25));
}
expect([v1.status, v2.status], [JobStatus.done, JobStatus.running]); expect([v1.status, v2.status], [JobStatus.done, JobStatus.running]);
expect(c.cancelVideos(shown), [v1], reason: '이미 끝남 - 알리고 다시 묻는다'); expect(c.cancelVideos(shown), [v1], reason: '이미 끝남 - 알리고 다시 묻는다');
await Future<void>.delayed(const Duration(milliseconds: 500)); await Future<void>.delayed(const Duration(milliseconds: 500));
@ -389,7 +393,7 @@ void main() {
await building; await building;
expect([v1.status, v2.status, v3.status], [JobStatus.done, JobStatus.cancelled, JobStatus.done], expect([v1.status, v2.status, v3.status], [JobStatus.done, JobStatus.cancelled, JobStatus.done],
reason: '${v1.message} ${v2.message} ${v3.message}'); reason: '${v1.message} ${v2.message} ${v3.message}');
}); }, timeout: const Timeout(Duration(minutes: 4)));
testWidgets('198: 원어를 자동 감지한 동영상은 세부 정보에 감지한 언어 · [다른 언어로 다시] (알림을 놓쳐도)', (tester) async { testWidgets('198: 원어를 자동 감지한 동영상은 세부 정보에 감지한 언어 · [다른 언어로 다시] (알림을 놓쳐도)', (tester) async {
tester.view.physicalSize = const Size(1600, 900); tester.view.physicalSize = const Size(1600, 900);