Skip to content

Commit 19291ee

Browse files
committed
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 <[email protected]>
1 parent 7884ab9 commit 19291ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/integration_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1762,7 +1762,7 @@ def test_792_explicit_port_protocol(self):
17621762

17631763
tcp_port, udp_port = random.sample(range(9999, 32000), 2)
17641764
ctnr = self.client.create_container(
1765-
BUSYBOX, 'true', ports=[2000, (2000, 'udp')],
1765+
BUSYBOX, ['sleep', '9999'], ports=[2000, (2000, 'udp')],
17661766
host_config=self.client.create_host_config(
17671767
port_bindings={'2000/tcp': tcp_port, '2000/udp': udp_port}
17681768
)

0 commit comments

Comments
 (0)