backend: make test more reliable

This commit is contained in:
Xiang Li
2016-01-13 21:57:40 -08:00
parent 0cba12d991
commit e1de19bf75
3 changed files with 18 additions and 6 deletions

View File

@ -137,6 +137,8 @@ func (t *batchTx) commit(stop bool) {
return
}
err = t.tx.Commit()
atomic.AddInt64(&t.backend.commits, 1)
t.pending = 0
if err != nil {
log.Fatalf("storage: cannot commit tx (%s)", err)