Skip to content

test: fix a couple flaky/broken tests#3008

Merged
milas merged 2 commits into
docker:masterfrom
milas:flaky-tests
Jul 26, 2022
Merged

test: fix a couple flaky/broken tests#3008
milas merged 2 commits into
docker:masterfrom
milas:flaky-tests

Conversation

@milas
Copy link
Copy Markdown
Contributor

@milas milas commented Jul 26, 2022

test: fix flaky container log test

Ensure the container has exited before attempting to grab the logs.

Since we are not streaming them, it's possible to attach + grab logs
before the output is processed, resulting in a test failure. If the
container has exited, it's guaranteed to have logged :)

test: mark invalid test as xfail

This test looks for some behavior on non-chunked HTTP requests.

It now fails because it looks like recent versions of Docker Engine
ALWAYS return chunked responses (or perhaps this specific response
changed somehow to now trigger chunking whereas it did not previously).

The actual logic it's trying to test is also unusual because it's
trying to hackily propagate errors under the assumption that it'd get
a non-chunked response on failure, which is...not reliable. Arguably,
the chunked reader should be refactored somehow but that's a refactor
we can't really commit to (and it's evidently been ok enough as is
up until now).

milas added 2 commits July 26, 2022 13:00
Ensure the container has exited before attempting to grab the logs.

Since we are not streaming them, it's possible to attach + grab logs
before the output is processed, resulting in a test failure. If the
container has exited, it's guaranteed to have logged :)

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
This test looks for some behavior on non-chunked HTTP requests.

It now fails because it looks like recent versions of Docker Engine
ALWAYS return chunked responses (or perhaps this specific response
changed somehow to now trigger chunking whereas it did not previously).

The actual logic it's trying to test is also unusual because it's
trying to hackily propagate errors under the assumption that it'd get
a non-chunked response on failure, which is...not reliable. Arguably,
the chunked reader should be refactored somehow but that's a refactor
we can't really commit to (and it's evidently been ok enough as is
up until now).

Signed-off-by: Milas Bowman <milas.bowman@docker.com>
@milas milas requested a review from a team July 26, 2022 17:01
@milas milas self-assigned this Jul 26, 2022
@milas milas changed the title Flaky tests test: fix a couple flaky/broken tests Jul 26, 2022
@milas milas merged commit cf62103 into docker:master Jul 26, 2022
@milas milas deleted the flaky-tests branch July 26, 2022 19:48
@milas milas added this to the 6.0.0 milestone Jul 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants