We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4574888 commit 1e50d4fCopy full SHA for 1e50d4f
internal/pool/pool_test.go
@@ -508,9 +508,13 @@ func TestDialerRetryConfiguration(t *testing.T) {
508
}
509
510
// Should have attempted 5 times (default DialerRetries = 5)
511
+ // There might be 1 additional attempt due to tryDial() recovery mechanism
512
finalAttempts := atomic.LoadInt64(&attempts)
- if finalAttempts != 5 {
513
- t.Errorf("Expected 5 dial attempts (default), got %d", finalAttempts)
+ if finalAttempts < 5 {
514
+ t.Errorf("Expected at least 5 dial attempts (default), got %d", finalAttempts)
515
+ }
516
+ if finalAttempts > 6 {
517
+ t.Errorf("Expected around 5 dial attempts, got %d (too many)", finalAttempts)
518
519
})
520
0 commit comments