Make PID status test deterministic (resolves #5232) - #5565
Open
w3lld1 wants to merge 1 commit into
Open
Conversation
adamnovak
reviewed
Aug 13, 2026
adamnovak
left a comment
Member
There was a problem hiding this comment.
This looks OK, and I think will indeed fix the bug, but it could be laid out a little better.
Comment on lines
+403
to
+411
| workflow = """ | ||
| from toil.job import Job | ||
| from toil.test.utils.utilsTest import wait_for_file | ||
| import sys | ||
|
|
||
| options = Job.Runner.getDefaultOptions(sys.argv[1]) | ||
| options.clean = "never" | ||
| Job.Runner.startToil(Job.wrapFn(wait_for_file, sys.argv[2]), options) | ||
| """ |
Member
There was a problem hiding this comment.
It might be better for this to be its own Python file and not an inline string.
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.
Changelog Entry
To be copied to the draft changelog by merger:
Summary
I changed
testGetPIDStatusto launch a workflow that waits for an explicit release file. This keeps the leader process alive until the test has observed theRUNNINGstate, then lets the workflow finish so the existingCOMPLETEDand missing-PID checks still run.This removes the timing dependency on the small sort workflow finishing before an overloaded CI runner polls its status.
Validation
python -m pytest src/toil/test/utils/utilsTest.py::TestUtils::testGetPIDStatus -q(20 consecutive runs, plus a post-commit run)python -m pytest src/toil/test/utils/utilsTest.py -q(8 passed, 4 dependency/integration skips)git diff --checkThe complete repository test suite is deferred to CI.
Fixes #5232