Browse Source

fix tests

pull/4097/head
chrislu 2 years ago
parent
commit
c589e9837c
  1. 2
      weed/storage/needle_map_metric_test.go

2
weed/storage/needle_map_metric_test.go

@ -16,7 +16,7 @@ func TestFastLoadingNeedleMapMetrics(t *testing.T) {
for i := 0; i < 10000; i++ {
nm.Put(Uint64ToNeedleId(uint64(i+1)), Uint32ToOffset(uint32(0)), Size(1))
if rand.Float32() < 0.2 {
if rand.Float32() < 0.2 && i > 0 {
nm.Delete(Uint64ToNeedleId(uint64(rand.Int63n(int64(i))+1)), Uint32ToOffset(uint32(0)))
}
}

Loading…
Cancel
Save