Skip to content

Commit

Permalink
Disable int range to support go < 1.22 for a bit longer
Browse files Browse the repository at this point in the history
  • Loading branch information
lestrrat committed Sep 19, 2024
1 parent c66af92 commit e382c1b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fluent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@ func TestConnectOnStart(t *testing.T) {
// find a port that is not available (this may be timing dependent)
var dialer net.Dialer
port := 22412
for range 1000 {
//nolint:intrange
for i := 0; i < 1000; i++ {
ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond)
conn, err := dialer.DialContext(ctx, `net`, fmt.Sprintf(`127.0.0.1:%d`, port))
cancel()
Expand Down Expand Up @@ -672,7 +673,8 @@ func TestPing(t *testing.T) {
// find a port that is not available (this may be timing dependent)
var dialer net.Dialer
port := 22412
for range 1000 {
//nolint:intrange
for i := 0; i < 1000; i++ {
ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond)
conn, err := dialer.DialContext(ctx, `net`, fmt.Sprintf(`127.0.0.1:%d`, port))
cancel()
Expand Down

0 comments on commit e382c1b

Please sign in to comment.