From 19291ee20dbef71c40a52acb7a3774862f7f99b8 Mon Sep 17 00:00:00 2001 From: Paul Bellamy Date: Thu, 1 Oct 2015 14:02:16 +0100 Subject: [PATCH] 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 --- tests/integration_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration_test.py b/tests/integration_test.py index a5a25e58ef..a715ef6edc 100644 --- a/tests/integration_test.py +++ b/tests/integration_test.py @@ -1762,7 +1762,7 @@ def test_792_explicit_port_protocol(self): 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} )