From b0e0561f0a1f4aa1f62f8761ee0095535e3e8bc8 Mon Sep 17 00:00:00 2001 From: Jay Date: Thu, 6 Aug 2026 09:45:19 -0400 Subject: [PATCH] testing: wait for responses instead of checking immediately --- auth_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/auth_test.go b/auth_test.go index 9f2b65c..6046c2d 100644 --- a/auth_test.go +++ b/auth_test.go @@ -166,7 +166,9 @@ func TestAuthManager(t *testing.T) { return len(calls) == 2 && calls[1] == "def" }, "callback not called twice with both challenges") - assert.GreaterOrEqual(t, len(p.sent), 2) + Eventually(t, func() bool { + return len(p.sent) >= 2 + }, "expected 2 auth responses in pool") }) t.Run("malformed AUTH ignored", func(t *testing.T) {