Merge pull request #4006 from mitake/kvtest-deadlock

storage, test: unlock transaction in the retry loop
This commit is contained in:
Xiang Li 2015-12-16 18:06:14 -08:00
commit 9b0b15c9be

View File

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