Browse Source

fix related tests

pull/853/head
Chris Lu 6 years ago
parent
commit
09471b46f9
  1. 4
      weed/storage/needle/compact_map_test.go

4
weed/storage/needle/compact_map_test.go

@ -68,7 +68,7 @@ func TestCompactMap(t *testing.T) {
t.Fatal("key", i, "size", v.Size) t.Fatal("key", i, "size", v.Size)
} }
} else if i%37 == 0 { } else if i%37 == 0 {
if ok && v.Size > 0 {
if ok && v.Size != TombstoneFileSize {
t.Fatal("key", i, "should have been deleted needle value", v) t.Fatal("key", i, "should have been deleted needle value", v)
} }
} else if i%2 == 0 { } else if i%2 == 0 {
@ -81,7 +81,7 @@ func TestCompactMap(t *testing.T) {
for i := uint32(10 * batch); i < 100*batch; i++ { for i := uint32(10 * batch); i < 100*batch; i++ {
v, ok := m.Get(NeedleId(i)) v, ok := m.Get(NeedleId(i))
if i%37 == 0 { if i%37 == 0 {
if ok && v.Size > 0 {
if ok && v.Size != TombstoneFileSize {
t.Fatal("key", i, "should have been deleted needle value", v) t.Fatal("key", i, "should have been deleted needle value", v)
} }
} else if i%2 == 0 { } else if i%2 == 0 {

Loading…
Cancel
Save