Merge remote-tracking branch 'origin/main' into review3-ports
CI / Build and test (pull_request) Successful in 11m22s
CI / Windows tests and installer (pull_request) Skipped
CI / YAML check (pull_request) Successful in 7s
CI / PostgreSQL 16 integration (pull_request) Successful in 10m51s
CI / PostgreSQL 17 integration (pull_request) Successful in 10m55s
CI / Docker image (pull_request) Successful in 1m33s

This commit is contained in:
Alby96 committed 2026-11-04 11:04:25 +01:00
commit 917cddde41
1 file changed
+11 -1
@@ -118,7 +118,17 @@ public sealed class DecodeParallelismTests
await using (var source = new SequenceFrameSource(frames, frames.LightFrames(), new ImageDecoder([decoder]), window))
{
Assert.Equal(1, source.DevelopingLimit(1920, DecodePurpose.Render));
foreach (var index in new[] { 0, 2, 4, 6 })
using (await source.GetFrameAsync(0, 1920, DecodePurpose.Render, CancellationToken.None)) { }
// The read-ahead starts on the thread pool; on a busy runner it may not have begun before the next frames are
// asked for, and then nothing would race. Wait until it develops a frame of its own, so the demand loads below
// always meet a developing read-ahead.
var started = DateTime.UtcNow;
while (decoder.Decodes < 2)
{
Assert.True(DateTime.UtcNow - started < TimeSpan.FromSeconds(TestTiming.Budget(10)), "the read-ahead never started");
await Task.Delay(5);
}
foreach (var index in new[] { 2, 4, 6 })
using (await source.GetFrameAsync(index, 1920, DecodePurpose.Render, CancellationToken.None)) { }
}
Assert.Equal(1, decoder.Peak);