summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorteutat3s <10206665+teutat3s@users.noreply.github.com>2023-05-21 17:10:44 +0200
committerteutat3s <10206665+teutat3s@users.noreply.github.com>2023-05-21 17:10:44 +0200
commit810268b85317d5ce6b79309ca27f3f561c2186a5 (patch)
tree3761b8785f7e227a85c922dfa8468bc54e8300e5 /nixos
parent3005f20ce0aaa58169cdee57c8aa12e5f1b6e1b3 (diff)
nixosTests.prometheus-exporters.statsd fix test
Diffstat (limited to 'nixos')
-rw-r--r--nixos/tests/prometheus-exporters.nix14
1 files changed, 8 insertions, 6 deletions
diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix
index adc2b467be514..4e2e0401ddf08 100644
--- a/nixos/tests/prometheus-exporters.nix
+++ b/nixos/tests/prometheus-exporters.nix
@@ -1194,13 +1194,15 @@ let
         wait_for_unit("prometheus-statsd-exporter.service")
         wait_for_open_port(9102)
         succeed("curl http://localhost:9102/metrics | grep 'statsd_exporter_build_info{'")
-        succeed(
-          "echo 'test.udp:1|c' > /dev/udp/localhost/9125",
-          "curl http://localhost:9102/metrics | grep 'test_udp 1'",
+        wait_until_succeeds(
+          "echo 'test.udp:1|c' > /dev/udp/localhost/9125 && \
+          curl http://localhost:9102/metrics | grep 'test_udp 1'",
+          timeout=10
         )
-        succeed(
-          "echo 'test.tcp:1|c' > /dev/tcp/localhost/9125",
-          "curl http://localhost:9102/metrics | grep 'test_tcp 1'",
+        wait_until_succeeds(
+          "echo 'test.tcp:1|c' > /dev/tcp/localhost/9125 && \
+          curl http://localhost:9102/metrics | grep 'test_tcp 1'",
+          timeout=10
         )
       '';
     };