From 7a1d13f9147bdb91547644fb413c4d89e08d2f08 Mon Sep 17 00:00:00 2001 From: michalskrivanek Date: Thu, 4 Sep 2025 09:01:33 +0200 Subject: [PATCH] give exporters some time to disconnect this is supposed to help with a flaky test "can lease and connect to exporters". The delete leases operation before this test causes exporters to disconnect, but it can take a short while to initiate that, and the kubectl wait in wait_for_exporter() can catch the Online/Registered state from before the disconnect. Let's see if it helps... --- tests.bats | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests.bats b/tests.bats index ee617a6..5f0cc0b 100644 --- a/tests.bats +++ b/tests.bats @@ -6,6 +6,9 @@ setup() { } wait_for_exporter() { + # After a lease operation the exporter is disconnecting from controller and reconnecting. + # The disconnect can take a short while so let's avoid catching the pre-disconnect state and early return + sleep 2 kubectl -n default wait --timeout 20m --for=condition=Online --for=condition=Registered \ exporters.jumpstarter.dev/test-exporter-oidc kubectl -n default wait --timeout 20m --for=condition=Online --for=condition=Registered \