Skip to content

Commit

Permalink
Increase timeout for DialAndSend context
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
wneessen committed Nov 21, 2024
1 parent 1a579c2 commit 6e9df0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6e9df0b

Please sign in to comment.