From fc53f376760543d2ac231992474b1198279d1b06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Thu, 13 Aug 2026 16:30:47 +0300 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20test(playback):=20the=20worker=20st?= =?UTF-8?q?ill=20answers=20after=20it=20parks=20its=20decoder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/crates/engine/tests/playback.rs b/crates/engine/tests/playback.rs index 7d89f1c..33d01a4 100644 --- a/crates/engine/tests/playback.rs +++ b/crates/engine/tests/playback.rs @@ -1645,4 +1645,17 @@ fn a_freshly_opened_file_queues_more_than_two_pictures() { "a freshly opened file queued {burst} pictures: the first worker is \ still sizing its queue from a pass-through canvas" ); + + // ...and the same worker still answers. Four and a half seconds parked is + // well past the idle mark at which it closes its hardware session + // (`decode`'s `IDLE`), so this is the seek that has to reopen one lazily -- + // the one path that would have gone quiet if closing it left the worker + // holding a decoder it could no longer use. + let fps = session.meta().frame_rate; + session.seek(2.0); + assert_eq!( + next_index(&mut session, "a seek after the worker went idle"), + (2.0 * fps) as u32, + "the worker did not come back from its idle park" + ); }