Repository navigation
test: use a shared 30-second events stream hang guard - #699
Merged
Merged
Conversation
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes Reviewed the timeout-only change in EventsControllerTests.cs and the corresponding stream cancellation behavior.
- Shared hang guard: All three stream completion waits and the text polling helper now use one 30-second timeout, retaining finite failure bounds while allowing delayed scheduling.
- Preserved coverage: Behavioral assertions and token-expiry inputs are unchanged. All 12 affected test cases passed locally. The original timeout remains unreproduced, as explicitly documented in the PR; the load harness and full suite were not repeated during this review.
gpt-6.1-sol | 𝕏
|
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.




Use one shared 30-second hang guard for all three stream completion waits and the text polling helper in
tests/Orbit.Infrastructure.Tests/Events/EventsControllerTests.cs. The bounds guard against hangs rather than define a performance budget, so the larger allowance tolerates delayed scheduling while retaining a finite failure bound.All behavioral assertions and token expiry inputs are unchanged. Only the named test file changes; production code and contracts are untouched.
Fixes thomasluizon/orbit-tickets#1208.
Test evidence
The unchanged class passed before the fix. The reported timeout at original line 135 was not reproduced in 61 loaded runs of the class, including 20 full infrastructure runs and one full-solution run. No pre-fix failure or red-to-green result is claimed. The acceptance requirement to reuse a load that first made line 135 fail remains unverified.
The observed failure that filed this ticket (orchestrator note): a full
env -u LANG dotnet test Orbit.slnx --no-buildrun on thefix/ticket-1204-validation-fix-copytree, at a one-minute load of about 8 while another worker ran, failedEventsControllerTests.Stream_SendsPublishedChangesOncewithSystem.TimeoutException : The operation has timed out.at line 135 (await stream.WaitAsync(TimeSpan.FromSeconds(2))), and the same build then passed the class 12 of 12 in five consecutive runs alone. That single red is the evidence for the change; it widens only hang guards and keeps every assertion.No behavioral test was strengthened: this ticket changes the hang guards in the existing tests and requires every behavioral assertion to stay unchanged. The existing published-change, replay, readiness, shutdown, revocation and expiry checks were exercised in every class run.
The machine has 18 logical CPUs. Each load harness ran busy loops in the stated number of separate processes and at most four concurrent test commands, with
LANGremoved from the test environment. The separate full-solution run added test processes during its reproduction attempt. Each focused class run executed all 12 cases.The full-solution reproduction command ran during the final portion of the loaded infrastructure batch, adding contention to that portion.
Commands:
The solution was rebuilt after the change with zero errors. The focused class passed before committing; all pre-commit hooks passed. Full-suite result after the commit: all 7,116 tests passed, none failed or skipped. The working tree is clean.
Temporary load harness used outside the repository
Save as
ticket-1208-load.pyand run the commands above. Test output is saved separately for each run. The timeout marker is diagnostic only; pass counts come from the test command exit codes and were checked against the test summaries.