Permalink
Browse files

Fix the test breakage. And potentially a newly introduced bug #2397.

  • Loading branch information...
manishrjain committed May 17, 2018
1 parent 7851bb7 commit 7f21b825713ea0e1d668bd9fec52debb457a79d5
Showing with 5 additions and 3 deletions.
  1. +1 −3 dgraph/cmd/server/http_test.go
  2. +4 −0 posting/mvcc.go
@@ -161,10 +161,8 @@ func TestTransactionBasic(t *testing.T) {
keys, mts, err := mutationWithTs(m1, false, true, ts)
require.NoError(t, err)
require.Equal(t, mts, ts)
expected := []string{"321112eei4n9g", "321112eei4n9g", "3fk4wxiwz6h3r", "3mlibw7eeno0x"}
sort.Strings(expected)
sort.Strings(keys)
require.Equal(t, expected, keys)
require.Equal(t, 4, len(keys))
data, _, err := queryWithTs(q1, 0)
require.NoError(t, err)
View
@@ -393,6 +393,10 @@ func ReadPostingList(key []byte, it *badger.Iterator) (*List, error) {
// Iterates from highest Ts to lowest Ts
for it.Valid() {
item := it.Item()
if item.IsDeletedOrExpired() {
it.Next()
continue
}
if !bytes.Equal(item.Key(), l.key) {
break
}

0 comments on commit 7f21b82

Please sign in to comment.