fix flaky TestRunContainerWithRmFlag tests (take 2)#43733
Merged
thaJeztah merged 1 commit intomoby:masterfrom Jun 22, 2022
Merged
fix flaky TestRunContainerWithRmFlag tests (take 2)#43733thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah merged 1 commit intomoby:masterfrom
Conversation
This is a new attempt on making these tests less flaky. The previous attempt in commit 585c147 assumed that the test was failing if the test-daemon still had unrelated containers present from other tests, but it appears that the actual reason for the tests to be flaky may be that the `--rm` option was moved to the daemon side and an asynchronous operation. As a result, the container may not yet be removed once the `docker run` completes, which happens frequently on Windows (likely be- cause removing containers is somewhat slower on Windows). This patch adds a retry-loop (using `poll.WaitOn()`) to wait for the container to be removed. make DOCKER_GRAPHDRIVER=vfs TEST_FILTER='TestRunContainerWithRmFlag' test-integration INFO: Testing against a local daemon === RUN TestDockerSuite === RUN TestDockerSuite/TestRunContainerWithRmFlagCannotStartContainer === RUN TestDockerSuite/TestRunContainerWithRmFlagExitCodeNotEqualToZero --- PASS: TestDockerSuite (1.00s) --- PASS: TestDockerSuite/TestRunContainerWithRmFlagCannotStartContainer (0.50s) --- PASS: TestDockerSuite/TestRunContainerWithRmFlagExitCodeNotEqualToZero (0.49s) Signed-off-by: Sebastiaan van Stijn <[email protected]>
d457415 to
f1c111b
Compare
vvoland
approved these changes
Jun 22, 2022
crazy-max
approved these changes
Jun 22, 2022
Member
Author
|
Thanks for review; let me get this one in to (hopefully) get CI less flaky again |
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.
This is a new attempt on making these tests less flaky. The previous attempt in
commit 585c147 assumed that the test was failing
if the test-daemon still had unrelated containers present from other tests, but
it appears that the actual reason for the tests to be flaky may be that the
--rmoption was moved to the daemon side and an asynchronous operation. As a result,
the container may not yet be removed once the
docker runcompletes, which happensfrequently on Windows (likely be- cause removing containers is somewhat slower
on Windows).
This patch adds a retry-loop (using
poll.WaitOn()) to wait for the containerto be removed.
- A picture of a cute animal (not mandatory but encouraged)