diff options
| author | chrislu <chris.lu@gmail.com> | 2023-03-08 01:48:28 -0800 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2023-03-08 01:48:28 -0800 |
| commit | c589e9837cad8e856d98991444a4ac3dc479bdd9 (patch) | |
| tree | 82129198b59eca3f16bf30ea46c1e4d0028bc9f1 | |
| parent | 0cf4f2e89131b86acc550fbbda05fdadc7ccc287 (diff) | |
| download | seaweedfs-c589e9837cad8e856d98991444a4ac3dc479bdd9.tar.xz seaweedfs-c589e9837cad8e856d98991444a4ac3dc479bdd9.zip | |
fix tests
| -rw-r--r-- | weed/storage/needle_map_metric_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/storage/needle_map_metric_test.go b/weed/storage/needle_map_metric_test.go index 5645a015f..96919d103 100644 --- a/weed/storage/needle_map_metric_test.go +++ b/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))) } } |
