Explorar o código

mvcc/backend: fix to use the backend create by snapshot instead of origin one.

caoming %!s(int64=7) %!d(string=hai) anos
pai
achega
bf49b9a145
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      mvcc/backend/backend_test.go

+ 1 - 1
mvcc/backend/backend_test.go

@@ -74,7 +74,7 @@ func TestBackendSnapshot(t *testing.T) {
 	nb := New(bcfg)
 	defer cleanup(nb, f.Name())
 
-	newTx := b.BatchTx()
+	newTx := nb.BatchTx()
 	newTx.Lock()
 	ks, _ := newTx.UnsafeRange([]byte("test"), []byte("foo"), []byte("goo"), 0)
 	if len(ks) != 1 {