diff options
author | Martin Weinelt <mweinelt@users.noreply.github.com> | 2023-05-21 17:47:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-21 17:47:07 +0200 |
commit | 84229fb9cbd32f3c40be7d9741af96c73cb5cd1b (patch) | |
tree | dddc11aa77dd9c7bb1f5973c80281f290e50debc | |
parent | a02aaf96d1faedc7899d5359b5eff173ffbfca78 (diff) | |
parent | 810268b85317d5ce6b79309ca27f3f561c2186a5 (diff) |
Merge pull request #233247 from teutat3s/zhf/fix-prometheus-exporter-statsd
nixosTests.prometheus-exporters.statsd fix test
-rw-r--r-- | nixos/tests/prometheus-exporters.nix | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix index bb87f1a3df9b1..319bf2dea3232 100644 --- a/nixos/tests/prometheus-exporters.nix +++ b/nixos/tests/prometheus-exporters.nix @@ -1198,13 +1198,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 ) ''; }; |