forge
Explore
Log in

Don't you dare go Hollow

The cancel-landing bounds are liveness ceilings, not deadlines under test

Browse files at this commit

4478d5278152d18938dcab9a52a5cc7dc93e7cd9Ahmet Kaan GümüşParent: 92fe3fc
  • test
    • the cancel-landing bounds are liveness ceilings, not deadlines under test
Show full message
✅ test(export): the cancel-landing bounds are liveness ceilings, not deadlines under test
crates/engine/tests/export.rsmodified+8 -4
@@ -615,7 +615,11 @@ fn cancelling_leaves_no_file() {
615 std::thread::sleep(Duration::from_millis(10));615 std::thread::sleep(Duration::from_millis(10));
616 }616 }
617 handle.cancel();617 handle.cancel();
618- let result = wait(&handle, Duration::from_secs(5));618+ // A liveness ceiling, not a deadline under test: a cancel lands in ~5 s on an
619+ // idle box, and inside a full parallel run of this binary (34 tests, most of
620+ // them encoding) the worker can be starved well past that. 60 s still fails
621+ // the run if a cancel never lands.
622+ let result = wait(&handle, Duration::from_secs(60));
619 assert!(result.is_err(), "a cancelled export is an error");623 assert!(result.is_err(), "a cancelled export is an error");
620 assert!(!out.exists(), "no partial file survives a cancel");624 assert!(!out.exists(), "no partial file survives a cancel");
621 assert!(!part_path(&out).exists(), "the .part is cleaned up too");625 assert!(!part_path(&out).exists(), "the .part is cleaned up too");
@@ -653,7 +657,7 @@ fn cancelling_after_the_last_frame_leaves_no_file() {
653 }657 }
654 handle.cancel();658 handle.cancel();
655 659
656- let result = wait(&handle, Duration::from_secs(30));660+ let result = wait(&handle, Duration::from_secs(120));
657 assert!(!part.exists(), "attempt {attempt} left a .part behind");661 assert!(!part.exists(), "attempt {attempt} left a .part behind");
658 if result.is_err() {662 if result.is_err() {
659 assert!(!out.exists(), "a late cancel still wrote {}", out.display());663 assert!(!out.exists(), "a late cancel still wrote {}", out.display());
@@ -1262,7 +1266,7 @@ fn a_proxy_is_picture_only_every_frame_a_starting_point_and_cached() {
1262 let started = Instant::now();1266 let started = Instant::now();
1263 while session.try_frame().is_none() {1267 while session.try_frame().is_none() {
1264 assert!(1268 assert!(
1265- started.elapsed() < Duration::from_secs(10),1269+ started.elapsed() < Duration::from_secs(60),
1266 "no picture after switching to the stand-in"1270 "no picture after switching to the stand-in"
1267 );1271 );
1268 std::thread::sleep(Duration::from_millis(10));1272 std::thread::sleep(Duration::from_millis(10));
@@ -1555,7 +1559,7 @@ fn a_proxy_of_real_4k_film_is_made_faster_than_it_plays() {
1555 let stopped = Instant::now();1559 let stopped = Instant::now();
1556 while !job.is_finished() {1560 while !job.is_finished() {
1557 assert!(1561 assert!(
1558- stopped.elapsed() < Duration::from_secs(30),1562+ stopped.elapsed() < Duration::from_secs(120),
1559 "the proxy did not stop when cancelled"1563 "the proxy did not stop when cancelled"
1560 );1564 );
1561 std::thread::sleep(Duration::from_millis(50));1565 std::thread::sleep(Duration::from_millis(50));