From 17cb736c4e509278cac84071614287bfeef428fc Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone <exarkun@twistedmatrix.com> Date: Mon, 11 Jul 2022 14:16:37 -0400 Subject: [PATCH] Fix unrelated non-determinism bug in the system tests The port is not necessarily bound by the time systemd considers the unit started so wait for the port instead of the unit. --- nixos/tests/test_privatestorage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/tests/test_privatestorage.py b/nixos/tests/test_privatestorage.py index e1f34fa4..91177949 100644 --- a/nixos/tests/test_privatestorage.py +++ b/nixos/tests/test_privatestorage.py @@ -100,7 +100,7 @@ def test( # Make sure the fake Stripe API server is ready for requests. try: - api_stripe_com.wait_for_unit("api.stripe.com") + api_stripe_com.wait_for_open_port(80) except: code, output = api_stripe_com.execute('journalctl -u api.stripe.com') api_stripe_com.log(output) -- GitLab