storage, test: unlock transaction in the retry loop

This commit is contained in:
Hitoshi Mitake 2015-12-16 17:01:04 +09:00
parent a907ca5e62
commit af2569c2d8

View File

@ -654,11 +654,11 @@ func TestRestoreContinueUnfinishedCompaction(t *testing.T) {
tx = s1.b.BatchTx() tx = s1.b.BatchTx()
tx.Lock() tx.Lock()
ks, _ := tx.UnsafeRange(keyBucketName, revbytes, nil, 0) ks, _ := tx.UnsafeRange(keyBucketName, revbytes, nil, 0)
tx.Unlock()
if len(ks) != 0 { if len(ks) != 0 {
time.Sleep(100 * time.Millisecond) time.Sleep(100 * time.Millisecond)
continue continue
} }
tx.Unlock()
return return
} }