Browse Source

testing

pull/1171/head
Chris Lu 5 years ago
parent
commit
d8b39fe92a
  1. 9
      weed/storage/needle_map/compact_map_test.go

9
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)

Loading…
Cancel
Save