Skip to content

Commit

Permalink
Merge pull request docker#3008 from milas/flaky-tests
Browse files Browse the repository at this point in the history
test: fix a couple flaky/broken tests
  • Loading branch information
milas authored Jul 26, 2022
2 parents 2e6dad7 + 4765f62 commit cf62103
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/integration/api_container_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1217,12 +1217,14 @@ def test_run_container_reading_socket(self):
data = read_exactly(pty_stdout, next_size)
assert data.decode('utf-8') == line

@pytest.mark.timeout(10)
def test_attach_no_stream(self):
container = self.client.create_container(
TEST_IMG, 'echo hello'
)
self.tmp_containers.append(container)
self.client.start(container)
self.client.wait(container, condition='not-running')
output = self.client.attach(container, stream=False, logs=True)
assert output == 'hello\n'.encode(encoding='ascii')

Expand Down
1 change: 1 addition & 0 deletions tests/integration/regression_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@


class TestRegressions(BaseAPIIntegrationTest):
@pytest.mark.xfail(True, reason='Docker API always returns chunked resp')
def test_443_handle_nonchunked_response_in_stream(self):
dfile = io.BytesIO()
with pytest.raises(docker.errors.APIError) as exc:
Expand Down

0 comments on commit cf62103

Please sign in to comment.