fix: increase Test_Server_CapabilityError timeout to prevent race wit…#22501
Draft
Tofel wants to merge 1 commit into
Draft
fix: increase Test_Server_CapabilityError timeout to prevent race wit…#22501Tofel wants to merge 1 commit into
Tofel wants to merge 1 commit into
Conversation
…h expiry ticker RequestTimeout was 100ms — equal to the ticker interval — causing the expiry goroutine to fire Cancel(Error_TIMEOUT) before async broker delivery of all 10 messages completed on loaded CI machines. Fixes CRE-4319
3 tasks
Contributor
|
✅ No conflicts with other open PRs targeting |
|
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
RequestTimeoutfrom100msto10sinTest_Server_CapabilityErrorto eliminate a race condition between the server's expiry ticker and async message delivery.Root cause
RequestTimeout=100msequalled the ticker interval returned bygetServerTickerInterval. On loaded CI machines, the expiry goroutine firesCancel(Error_TIMEOUT)before all 10 async messages from 10 workflow peers complete delivery throughtestAsyncMessageBroker's serialsendChconsumer. The 10thOnMessagethen findshasResponse()==true(set byCancel) and dispatchesError_TIMEOUTinstead of the expectedError_INTERNAL_ERROR.Fix
Raise the timeout to
10s— matching the convention used by other tests in this file.TestErrorCapabilityreturns synchronously, so the test still completes in milliseconds; only the safety margin changes.Flaky test fixes
Test_Server_CapabilityErrorTest plan
Test_Server_CapabilityErrorpassed 10/10 runs locally with-race -shuffle=ongolangci-lintclean for./core/capabilities/remote/executable/...