]> Sergey Matveev's repositories - btrtrc.git/blobdiff - rlreader_test.go
Drop support for go 1.20
[btrtrc.git] / rlreader_test.go
index 0391c619b1c4e08247df9752468cbc0afd6f7154..6bf25c432c6ba3269c9cbbce2ecf81d2681dc323 100644 (file)
@@ -8,7 +8,6 @@ import (
        "testing"
        "time"
 
-       "github.com/bradfitz/iter"
        "github.com/stretchr/testify/assert"
        "github.com/stretchr/testify/require"
        "golang.org/x/time/rate"
@@ -59,7 +58,7 @@ func TestRateLimitReaders(t *testing.T) {
        }
        reads := make(chan read)
        done := make(chan struct{})
-       for range iter.N(numReaders) {
+       for i := 0; i < numReaders; i += 1 {
                r, w := io.Pipe()
                ws = append(ws, w)
                cs = append(cs, w)
@@ -99,7 +98,7 @@ func TestRateLimitReaders(t *testing.T) {
        }()
        written := 0
        go func() {
-               for range iter.N(writeRounds) {
+               for i := 0; i < writeRounds; i += 1 {
                        err := writeN(ws, bytesPerRound)
                        if err != nil {
                                log.Printf("error writing: %s", err)