G3: audio scrub test waits on the clock, not a step count (flaky under load)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Brandon ThomasandClaude Opus 5.5 committed 2026-10-09 00:17:53 -04:00
1 parent 742833bfa4
commit e4d1a4494f
1 file changed
+4 -1
+4 -1
View File
@@ -132,7 +132,10 @@ fn preview_with_audio_shows_every_frame_and_sounds_once_cached() {
assert!(h.state().playback.audio_held && h.state().audio.is_none(), "nothing is cached: no sound yet");
let mut last = frame(&h);
let mut shown = 0;
for _ in 0..2000 {
// Wait on the clock, not a step count: under a loaded machine (parallel test binaries) the
// background cache can take far longer than 2000 short steps to get ahead.
let deadline = std::time::Instant::now() + std::time::Duration::from_secs(60);
while std::time::Instant::now() < deadline {
h.step();
if h.state().audio.is_some() {
break;