Repository navigation
test: hold the first job so the trash-original busy notice is deterministic - #1952
Merged
Merged
Conversation
…nistic A_source_another_job_still_has_to_convert_is_kept_until_that_one_is_done queued the same file twice and expected the first job to keep the source with notice.trash_original_busy. The worker sometimes finished the first job before the second was queued, so nothing else needed the source, the first job trashed it and the notice never came (failed CI on #1677). FakeConverter gets a Gate task it waits for before converting. The test holds the first job on it until both jobs are queued, then lets it go. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 task done
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.
What
TrashOriginalTests.A_source_another_job_still_has_to_convert_is_kept_until_that_one_is_donenow holds the first job until both jobs are queued.FakeConvertergets an optionalGatetask that it waits for before converting. Without a gate it behaves as before: same synchronous path, same exceptions.TaskCompletionSourceas the gate, queues both jobs, then releases the gate.Why
The test queues the same file on two presets and expects the first job to keep the source, with
notice.trash_original_busy, because the second job still needs it. Sometimes the queue's worker finished the first job before the test had queued the second. Then no other job needed the source, the first job sent it to the Trash, and the notice never appeared. This failed CI on #1677.Jobs run one at a time from the channel. With the gate, the first job can only reach its Trash step once the second job is already waiting in the queue.
How tested
dotnet testonFilee.Core.Tests, filtered toTrashOriginalTestsandJobQueueTests: 95 passed, 1 skipped.dotnet format --verify-no-changeson the changed files.Test-only change, so no CHANGELOG line.
🤖 Generated with Claude Code