forge
Explore
Log in

Don't you dare go Hollow

The worker still answers after it parks its decoder

Browse files at this commit

fc53f376760543d2ac231992474b1198279d1b06Ahmet Kaan GümüşParent: 7985bd5
  • test
    • the worker still answers after it parks its decoder
Show full message
✅ test(playback): the worker still answers after it parks its decoder

The burst check already sits paused for four and a half seconds, which is
well past the idle mark where a parked worker closes its hardware session,
so the seek that follows is exactly the one that has to reopen one lazily.
Without it nothing here would notice a worker that came back from an idle
park holding a decoder it could no longer use.
crates/engine/tests/playback.rsmodified+13 -0
@@ -1645,4 +1645,17 @@ fn a_freshly_opened_file_queues_more_than_two_pictures() {
1645 "a freshly opened file queued {burst} pictures: the first worker is \1645 "a freshly opened file queued {burst} pictures: the first worker is \
1646 still sizing its queue from a pass-through canvas"1646 still sizing its queue from a pass-through canvas"
1647 );1647 );
1648+
1649+ // ...and the same worker still answers. Four and a half seconds parked is
1650+ // well past the idle mark at which it closes its hardware session
1651+ // (`decode`'s `IDLE`), so this is the seek that has to reopen one lazily --
1652+ // the one path that would have gone quiet if closing it left the worker
1653+ // holding a decoder it could no longer use.
1654+ let fps = session.meta().frame_rate;
1655+ session.seek(2.0);
1656+ assert_eq!(
1657+ next_index(&mut session, "a seek after the worker went idle"),
1658+ (2.0 * fps) as u32,
1659+ "the worker did not come back from its idle park"
1660+ );
1648 }1661 }