Skip to content

Commit

Permalink
"fix: ./stream_test.go:76:6: randomInt redeclared in this block"
Browse files Browse the repository at this point in the history
  • Loading branch information
KKorpse committed Nov 6, 2023
1 parent 295de10 commit 7323218
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/integration/stream_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ func streamRandomID(minID, maxID string) string {
minMs, _ := strconv.Atoi(minParts[0])
maxMs, _ := strconv.Atoi(maxParts[0])
delta := maxMs - minMs + 1
ms := minMs + randomInt(delta)
seq := randomInt(1000)
ms := minMs + randomInt4Stream(delta)
seq := randomInt4Stream(1000)
return fmt.Sprintf("%d-%d", ms, seq)
}

Expand All @@ -73,7 +73,7 @@ func streamSimulateXRANGE(items []redis.XMessage, start, end string) []redis.XMe
}

// Helper function for generating random integers
func randomInt(n int) int {
func randomInt4Stream(n int) int {
return rand.Intn(n)
}

Expand Down

0 comments on commit 7323218

Please sign in to comment.