From 6e9df0b724bb4be71f520c037c02e49bfe5ed31e Mon Sep 17 00:00:00 2001 From: Winni Neessen Date: Thu, 21 Nov 2024 10:33:24 +0100 Subject: [PATCH] Increase timeout for DialAndSend context Updated the timeout for the DialAndSend context in 'client_test.go' from 5 seconds to 1 minute to ensure sufficient time for the operation to complete. This change helps prevent premature timeouts that can cause test failures. --- client_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client_test.go b/client_test.go index d1912f4..f6d5161 100644 --- a/client_test.go +++ b/client_test.go @@ -2327,7 +2327,7 @@ func TestClient_DialAndSendWithContext(t *testing.T) { msg := testMessage(t) msg.SetMessageIDWithValue("this.is.a.message.id") - ctxDial, cancelDial := context.WithTimeout(ctx, time.Second*5) + ctxDial, cancelDial := context.WithTimeout(ctx, time.Minute) defer cancelDial() if goroutineErr := client.DialAndSendWithContext(ctxDial, msg); goroutineErr != nil { t.Errorf("failed to dial and send message: %s", goroutineErr)