Fix intermittent test TestProducer_PollOnly/JobStuckHandlerOpensExecutorSlot#1313
Open
brandur wants to merge 1 commit into
Open
Fix intermittent test TestProducer_PollOnly/JobStuckHandlerOpensExecutorSlot#1313brandur wants to merge 1 commit into
TestProducer_PollOnly/JobStuckHandlerOpensExecutorSlot#1313brandur wants to merge 1 commit into
Conversation
…utorSlot` Fix an intermittent test noticed in CI on another PR [1]. Just changes the test to only add a worker slot on the first stuck job which makes the test a little more reliable in slower test environments. Previously the test opened a replacement slot for every stuck job. After job 1 became stuck, job 2 started in the replacement slot. Because job 2 also blocked and used the same short timeout, depending on timing, it could also be marked stuck before the assertion ran, causing another replacement slot to be opened, and reducing counted active jobs to zero, with the assertion assuming only job 1 had been handled. The fix here is to make sure that only one replacement slot can be opened. [1] https://github.com/riverqueue/river/actions/runs/29541028860/job/87763137367?pr=1312
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.
Fix an intermittent test noticed in CI on another PR [1]. Just changes
the test to only add a worker slot on the first stuck job which makes
the test a little more reliable in slower test environments.
Previously the test opened a replacement slot for every stuck job. After
job 1 became stuck, job 2 started in the replacement slot. Because job 2
also blocked and used the same short timeout, depending on timing, it
could also be marked stuck before the assertion ran, causing another
replacement slot to be opened, and reducing counted active jobs to zero,
with the assertion assuming only job 1 had been handled. The fix here is
to make sure that only one replacement slot can be opened.
[1] https://github.com/riverqueue/river/actions/runs/29541028860/job/87763137367?pr=1312