Skip to content

Fix Windows-RabbitMQ RunScenario test timeout and cascade failures#5456

Merged
mauroservienti merged 1 commit intomasterfrom
fix/rabbitmq-transport-test-timeout
May 6, 2026
Merged

Fix Windows-RabbitMQ RunScenario test timeout and cascade failures#5456
mauroservienti merged 1 commit intomasterfrom
fix/rabbitmq-transport-test-timeout

Conversation

@mauroservienti
Copy link
Copy Markdown
Member

@mauroservienti mauroservienti commented May 6, 2026

Summary

  • GetThroughputPerDay loops 96 times (24×4), each requiring an HTTP call to the RabbitMQ management API plus sending and receiving 15 messages. On Windows CI this consistently exceeds the 60-second TestTimeout that bounds all CreateTaskCompletionSource instances, causing the test to time out mid-run.
  • When the timeout fires while the message pump is still running, the next message delivery calls SetResult on an already-faulted TCS, throwing InvalidOperationException. This propagates through the RabbitMQ pump as a processing error → onErrorAssert.Fail → critical-error handler → a second Assert.Fail, producing three apparent failures from one root cause.

Changes:

  • Raise TestTimeout from 60 s to 5 minutes to accommodate the test's 3-minute design budget with margin for slower Windows CI runners
  • Change SetResultTrySetResult to stop the cascade when a concurrent timeout and message delivery race

Fixes the consistently failing Windows-RabbitMQ job in PR #5446.

Test plan

  • CI Windows-RabbitMQ passes on this branch
  • All other transport matrix jobs remain green

🤖 Generated with Claude Code

GetThroughputPerDay loops 96 times (24*4), each requiring an HTTP call to
the RabbitMQ management API plus sending and receiving 15 messages. On Windows
CI, this consistently exceeds the 60-second TestTimeout that bounds all
CreateTaskCompletionSource instances via testCancellationTokenSource, causing
the test to fail with a timeout error mid-run.

When the timeout fires while the message pump is still running, the subsequent
delivery calls SetResult on an already-faulted TCS, throwing
InvalidOperationException. This propagates through the RabbitMQ pump as a
processing error, triggering the onError Assert.Fail, which then escalates to
the critical-error handler, producing three apparent failures from one root cause.

- Raise TestTimeout from 60s to 5 minutes to accommodate the test's 3-minute
  design budget with margin for slower Windows CI runners
- Change SetResult to TrySetResult to stop the cascade when a concurrent
  timeout and message delivery race

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mauroservienti mauroservienti merged commit 22b7efd into master May 6, 2026
33 checks passed
@mauroservienti mauroservienti deleted the fix/rabbitmq-transport-test-timeout branch May 6, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants