@@ -159,10 +159,10 @@ func testDefragmentingIteRandomizedOnce(t *testing.T, seed int64) {
159
159
var original , fragmented []keyspan.Span
160
160
numRangeKeys := 1 + rng .IntN (maxRangeKeys )
161
161
for i := 0 ; i < numRangeKeys ; i ++ {
162
- startIdx := rng .Int64N (ks .Count ())
163
- endIdx := rng .Int64N (ks .Count ())
162
+ startIdx := rng .Uint64N (ks .Count ())
163
+ endIdx := rng .Uint64N (ks .Count ())
164
164
for startIdx == endIdx {
165
- endIdx = rng .Int64N (ks .Count ())
165
+ endIdx = rng .Uint64N (ks .Count ())
166
166
}
167
167
if startIdx > endIdx {
168
168
startIdx , endIdx = endIdx , startIdx
@@ -183,7 +183,7 @@ func testDefragmentingIteRandomizedOnce(t *testing.T, seed int64) {
183
183
})
184
184
185
185
for startIdx < endIdx {
186
- width := rng .Int64N (endIdx - startIdx ) + 1
186
+ width := rng .Uint64N (endIdx - startIdx ) + 1
187
187
fragmented = append (fragmented , keyspan.Span {
188
188
Start : testkeys .Key (ks , startIdx ),
189
189
End : testkeys .Key (ks , startIdx + width ),
@@ -220,11 +220,11 @@ func testDefragmentingIteRandomizedOnce(t *testing.T, seed int64) {
220
220
{weight : 50 , fn : func () string { return "next" }},
221
221
{weight : 50 , fn : func () string { return "prev" }},
222
222
{weight : 5 , fn : func () string {
223
- k := testkeys .Key (ks , rng .Int64N (ks .Count ()))
223
+ k := testkeys .Key (ks , rng .Uint64N (ks .Count ()))
224
224
return fmt .Sprintf ("seekge(%s)" , k )
225
225
}},
226
226
{weight : 5 , fn : func () string {
227
- k := testkeys .Key (ks , rng .Int64N (ks .Count ()))
227
+ k := testkeys .Key (ks , rng .Uint64N (ks .Count ()))
228
228
return fmt .Sprintf ("seeklt(%s)" , k )
229
229
}},
230
230
}
0 commit comments