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 77c0c73 commit 011ef96Copy full SHA for 011ef96
internal/pool/pool_test.go
@@ -497,9 +497,14 @@ func TestDialerRetryConfiguration(t *testing.T) {
497
}
498
499
// Should have attempted 5 times (default DialerRetries = 5)
500
+ // Note: There may be one additional attempt from tryDial() goroutine
501
+ // which is launched when dialErrorsNum reaches PoolSize
502
finalAttempts := atomic.LoadInt64(&attempts)
- if finalAttempts != 5 {
- t.Errorf("Expected 5 dial attempts (default), got %d", finalAttempts)
503
+ if finalAttempts < 5 {
504
+ t.Errorf("Expected at least 5 dial attempts (default), got %d", finalAttempts)
505
+ }
506
+ if finalAttempts > 6 {
507
+ t.Errorf("Expected around 5 dial attempts, got %d (too many)", finalAttempts)
508
509
})
510
0 commit comments