diff options
| author | Ulysses Souza <ulysses.souza@docker.com> | 2019-04-04 10:29:36 +0200 |
|---|---|---|
| committer | Ulysses Souza <ulysses.souza@docker.com> | 2019-04-04 14:09:18 +0200 |
| commit | ef043559c4bbd3d1fbc06277160c253fab6df879 (patch) | |
| tree | 02c2f5cdca24e9858c076063b3e18ed31a6fcfc6 | |
| parent | 1b572a4340e9afea60d99fde9b32b302a8eb054b (diff) | |
| download | docker-py-ef043559c4bbd3d1fbc06277160c253fab6df879.tar.gz | |
Add 'sleep 2' to avoid race condition on attach
Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
| -rw-r--r-- | tests/integration/api_container_test.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/integration/api_container_test.py b/tests/integration/api_container_test.py index 5a8ba5a..b364f94 100644 --- a/tests/integration/api_container_test.py +++ b/tests/integration/api_container_test.py @@ -1267,19 +1267,16 @@ class AttachContainerTest(BaseAPIIntegrationTest): @pytest.mark.timeout(5) @pytest.mark.skipif(os.environ.get('DOCKER_HOST', '').startswith('ssh://'), reason='No cancellable streams over SSH') - @pytest.mark.xfail(condition=os.environ.get('DOCKER_TLS_VERIFY') or - os.environ.get('DOCKER_CERT_PATH'), - reason='Flaky test on TLS') def test_attach_stream_and_cancel(self): container = self.client.create_container( - BUSYBOX, 'sh -c "echo hello && sleep 60"', + BUSYBOX, 'sh -c "sleep 2 && echo hello && sleep 60"', tty=True ) self.tmp_containers.append(container) self.client.start(container) output = self.client.attach(container, stream=True, logs=True) - threading.Timer(1, output.close).start() + threading.Timer(3, output.close).start() lines = [] for line in output: |
