summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Bellamy <paul.a.bellamy@gmail.com>2015-10-01 14:02:16 +0100
committerPaul Bellamy <paul.a.bellamy@gmail.com>2015-10-01 14:05:50 +0100
commit19291ee20dbef71c40a52acb7a3774862f7f99b8 (patch)
treeb226da9fdde2e1aa39003e7a71d70a328b691449
parent7884ab9fe2c3b36209727821f81d322f2ade1b60 (diff)
downloaddocker-py-19291ee20dbef71c40a52acb7a3774862f7f99b8.tar.gz
Fix race condition in integration regression tests
`docker port` and inspect do not return ports for containers which are not running. Because the container command is `true`, sometimes that exits before the inspect is called. Signed-off-by: Paul Bellamy <paul.a.bellamy@gmail.com>
-rw-r--r--tests/integration_test.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/integration_test.py b/tests/integration_test.py
index a5a25e5..a715ef6 100644
--- a/tests/integration_test.py
+++ b/tests/integration_test.py
@@ -1762,7 +1762,7 @@ class TestRegressions(BaseTestCase):
tcp_port, udp_port = random.sample(range(9999, 32000), 2)
ctnr = self.client.create_container(
- BUSYBOX, 'true', ports=[2000, (2000, 'udp')],
+ BUSYBOX, ['sleep', '9999'], ports=[2000, (2000, 'udp')],
host_config=self.client.create_host_config(
port_bindings={'2000/tcp': tcp_port, '2000/udp': udp_port}
)