diff options
| author | Chris Lu <chris.lu@gmail.com> | 2019-12-24 11:29:26 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2019-12-24 11:29:26 -0800 |
| commit | d8b39fe92a31385f48238cac99faa830066ef9f8 (patch) | |
| tree | 6cc792cb942e9df057ceda1fd6c6264d5aa36065 | |
| parent | f42b5bd0f5a27b771f5b31a6976cf549c629ac95 (diff) | |
| download | seaweedfs-d8b39fe92a31385f48238cac99faa830066ef9f8.tar.xz seaweedfs-d8b39fe92a31385f48238cac99faa830066ef9f8.zip | |
testing
| -rw-r--r-- | weed/storage/needle_map/compact_map_test.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/weed/storage/needle_map/compact_map_test.go b/weed/storage/needle_map/compact_map_test.go index 3bad85727..633be07f6 100644 --- a/weed/storage/needle_map/compact_map_test.go +++ b/weed/storage/needle_map/compact_map_test.go @@ -8,7 +8,14 @@ import ( func TestOverflow2(t *testing.T) { m := NewCompactMap() - m.Set(NeedleId(150088), ToOffset(8), 3000073) + _, oldSize := m.Set(NeedleId(150088), ToOffset(8), 3000073) + if oldSize!=0{ + t.Fatalf("expecting no previous data") + } + _, oldSize = m.Set(NeedleId(150088), ToOffset(8), 3000073) + if oldSize!=3000073{ + t.Fatalf("expecting previous data size is %d, not %d", 3000073, oldSize) + } m.Set(NeedleId(150073), ToOffset(8), 3000073) m.Set(NeedleId(150089), ToOffset(8), 3000073) m.Set(NeedleId(150076), ToOffset(8), 3000073) |
