diff --git a/.github/e2e.hurl b/.github/e2e.hurl index f1729376..3f735783 100644 --- a/.github/e2e.hurl +++ b/.github/e2e.hurl @@ -103,7 +103,7 @@ GET http://127.0.0.1:8080/prometheus/api/v1/query query: akvorado_outlet_clickhouse_flow_per_batch{job="akvorado-outlet", quantile="0.5"} HTTP 200 [Asserts] -jsonpath "$.data.result[0].value[1]" toInt > 100 +jsonpath "$.data.result[0].value[1]" toInt > 20 ## Check we receive metrics from everything GET http://127.0.0.1:8080/prometheus/api/v1/query diff --git a/.github/e2e.sh b/.github/e2e.sh index 14b997ae..11666496 100755 --- a/.github/e2e.sh +++ b/.github/e2e.sh @@ -76,12 +76,25 @@ EOF # logcli -q series '{service_name=~".+"}' --analyze-labels # echo ::endgroup:: - # Run Hurl tests + # Run Hurl tests. Some of them may be difficult to get right, notably + # the ClickHouse batches (if we are rebalancing). We need to let some + # time between two tries because the quantiles need to be updated. echo ::group::Hurl tests - nix run nixpkgs#hurl -- --test --error-format=short .github/e2e.hurl || \ - nix run nixpkgs#hurl -- --test --error-format=short .github/e2e.hurl || \ - nix run nixpkgs#hurl -- --test --error-format=short .github/e2e.hurl || { - sleep 2 + ok=0 + for i in $(seq 1 5); do + echo "::group::Hurl tests ($i)" + if ! nix run nixpkgs#hurl -- --test --error-format=short .github/e2e.hurl; then + echo ::endgroup:: + sleep 10 + continue + else + echo ::endgroup:: + ok=1 + break + fi + done + [ $ok -eq 1 ] || { + sleep 10 nix run nixpkgs#hurl -- --test --error-format=long .github/e2e.hurl } echo ::endgroup::