The AV1 export budget is a hang guard, not a stopwatch
Browse files at this commita670b0a78ccb1a36e112aa33f3bc70f57a92dbd6Parent: 47c08dd- test
- the AV1 export budget is a hang guard, not a stopwatch
1 changed file +7 -4
crates/engine/tests/av1.rsmodified+7 -4
| @@ -336,7 +336,7 @@ fn an_mp4_export_of_a_matroska_source_carries_its_sound() { | |||
| 336 | let handle = engine::export::start(project, meta, &out, &ExportSettings::default()); | 336 | let handle = engine::export::start(project, meta, &out, &ExportSettings::default()); |
| 337 | let started = Instant::now(); | 337 | let started = Instant::now(); |
| 338 | while !handle.is_finished() { | 338 | while !handle.is_finished() { |
| 339 | - assert!(started.elapsed() < Duration::from_secs(300), "export hung"); | 339 | + assert!(started.elapsed() < Duration::from_secs(900), "export hung"); |
| 340 | std::thread::sleep(Duration::from_millis(20)); | 340 | std::thread::sleep(Duration::from_millis(20)); |
| 341 | } | 341 | } |
| 342 | handle | 342 | handle |
| @@ -410,7 +410,10 @@ fn exported( | |||
| 410 | #[test] | 410 | #[test] |
| 411 | fn an_av1_export_reopens_through_our_own_demuxer() { | 411 | fn an_av1_export_reopens_through_our_own_demuxer() { |
| 412 | let session = short_timeline(30.0); | 412 | let session = short_timeline(30.0); |
| 413 | - let out = exported(&session, "sw", &av1_settings(), Duration::from_secs(300)); | 413 | + // The software encoder alone costs ~270 s for these 30 frames on the |
| 414 | + // machine of record: 300 s left it one co-running test away from a | ||
| 415 | + // timeout, so the budget is a hang guard, not a speed claim. | ||
| 416 | + let out = exported(&session, "sw", &av1_settings(), Duration::from_secs(900)); | ||
| 414 | 417 | ||
| 415 | let (meta, mut demuxer) = Demuxer::open(&out).expect("reopen the export"); | 418 | let (meta, mut demuxer) = Demuxer::open(&out).expect("reopen the export"); |
| 416 | assert_eq!(meta.codec, Codec::Av1, "an AV1 export is AV1"); | 419 | assert_eq!(meta.codec, Codec::Av1, "an AV1 export is AV1"); |
| @@ -472,7 +475,7 @@ fn an_av1_export_carries_the_timelines_sound_in_either_container() { | |||
| 472 | let handle = session.export_to_with(&out, &settings); | 475 | let handle = session.export_to_with(&out, &settings); |
| 473 | let started = Instant::now(); | 476 | let started = Instant::now(); |
| 474 | while !handle.is_finished() { | 477 | while !handle.is_finished() { |
| 475 | - assert!(started.elapsed() < Duration::from_secs(300), "export hung"); | 478 | + assert!(started.elapsed() < Duration::from_secs(900), "export hung"); |
| 476 | std::thread::sleep(Duration::from_millis(20)); | 479 | std::thread::sleep(Duration::from_millis(20)); |
| 477 | } | 480 | } |
| 478 | handle.result().expect("outcome").expect("an AV1 export"); | 481 | handle.result().expect("outcome").expect("an AV1 export"); |
| @@ -530,7 +533,7 @@ fn an_av1_export_decodes_back_into_the_pictures_that_went_in() { | |||
| 530 | &session, | 533 | &session, |
| 531 | "roundtrip", | 534 | "roundtrip", |
| 532 | &av1_settings(), | 535 | &av1_settings(), |
| 533 | - Duration::from_secs(300), | 536 | + Duration::from_secs(900), |
| 534 | ); | 537 | ); |
| 535 | 538 | ||
| 536 | let (_, frames) = DecodeSession::open(&out).expect("decode the export"); | 539 | let (_, frames) = DecodeSession::open(&out).expect("decode the export"); |