Unverified Kaydet (Commit) 94d1edc3 authored tarafından Ulysses Souza's avatar Ulysses Souza Kaydeden (comit) GitHub

Merge pull request #2307 from ulyssessouza/xfail-flaky-test

Avoid race condition on test
...@@ -1267,19 +1267,16 @@ class AttachContainerTest(BaseAPIIntegrationTest): ...@@ -1267,19 +1267,16 @@ class AttachContainerTest(BaseAPIIntegrationTest):
@pytest.mark.timeout(5) @pytest.mark.timeout(5)
@pytest.mark.skipif(os.environ.get('DOCKER_HOST', '').startswith('ssh://'), @pytest.mark.skipif(os.environ.get('DOCKER_HOST', '').startswith('ssh://'),
reason='No cancellable streams over 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): def test_attach_stream_and_cancel(self):
container = self.client.create_container( container = self.client.create_container(
BUSYBOX, 'sh -c "echo hello && sleep 60"', BUSYBOX, 'sh -c "sleep 2 && echo hello && sleep 60"',
tty=True tty=True
) )
self.tmp_containers.append(container) self.tmp_containers.append(container)
self.client.start(container) self.client.start(container)
output = self.client.attach(container, stream=True, logs=True) output = self.client.attach(container, stream=True, logs=True)
threading.Timer(1, output.close).start() threading.Timer(3, output.close).start()
lines = [] lines = []
for line in output: for line in output:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment