Fix timing race in BackpressureTimeout_must_succeed_if_subscriber_demand_arrives test#7972
Merged
Conversation
…and_arrives test The test was failing intermittently in CI/CD with "No demand signalled in the last 00:00:01" because accumulated delays (750ms) left insufficient safety margin with the 1-second timeout. Changes: - Increased backpressure timeout from 1s to 2s - Reduced ExpectNoMsg delays from 250ms to 100ms per iteration This provides 1700ms safety margin (vs 250ms previously) to handle: - Async/await scheduling overhead - Thread pool contention in CI/CD environments - Timer check granularity and imprecision - Test infrastructure processing delays The test semantics remain unchanged - it still verifies that demand arriving within the timeout window prevents backpressure timeout errors.
Member
Author
|
This is, unfortunately, a timing-sensitive test and timeout jiggling is probably the best solution here |
Arkatufus
pushed a commit
to Arkatufus/akka.net
that referenced
this pull request
Jan 7, 2026
…and_arrives test (akkadotnet#7972) The test was failing intermittently in CI/CD with "No demand signalled in the last 00:00:01" because accumulated delays (750ms) left insufficient safety margin with the 1-second timeout. Changes: - Increased backpressure timeout from 1s to 2s - Reduced ExpectNoMsg delays from 250ms to 100ms per iteration This provides 1700ms safety margin (vs 250ms previously) to handle: - Async/await scheduling overhead - Thread pool contention in CI/CD environments - Timer check granularity and imprecision - Test infrastructure processing delays The test semantics remain unchanged - it still verifies that demand arriving within the timeout window prevents backpressure timeout errors.
Aaronontheweb
added a commit
that referenced
this pull request
Jan 8, 2026
…and_arrives test (#7972) The test was failing intermittently in CI/CD with "No demand signalled in the last 00:00:01" because accumulated delays (750ms) left insufficient safety margin with the 1-second timeout. Changes: - Increased backpressure timeout from 1s to 2s - Reduced ExpectNoMsg delays from 250ms to 100ms per iteration This provides 1700ms safety margin (vs 250ms previously) to handle: - Async/await scheduling overhead - Thread pool contention in CI/CD environments - Timer check granularity and imprecision - Test infrastructure processing delays The test semantics remain unchanged - it still verifies that demand arriving within the timeout window prevents backpressure timeout errors.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixed an intermittent test failure in
BackpressureTimeout_must_succeed_if_subscriber_demand_arrivesthat was occurring in CI/CD environments due to timing race conditions.Root Cause
The test was experiencing a timing race where accumulated delays exceeded the backpressure timeout threshold:
In CI/CD environments with thread pool contention, async/await overhead, and timer imprecision, this insufficient margin caused the timeout to trigger before demand was registered, resulting in:
Changes
BackpressureTimeoutfrom 1 second to 2 secondsExpectNoMsgdelays from 250ms to 100ms per iterationResult
This provides adequate buffer for:
Testing
✅ Test passes reliably with the new timing parameters
✅ Test semantics unchanged - still verifies demand arriving within timeout prevents backpressure errors
Related
Addresses racy test failures similar to other timeout tests in the same file that are marked as
LocalFact.