Merge pull request #11816 from gaurav1086/fix_race_condition_kv_test

mvcc: fix race in TestKVTxnBlockWriteOperations
This commit is contained in:
Brandon Philips 2020-04-28 16:11:26 -07:00 committed by GitHub
commit d8bbf7f58d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -410,10 +410,11 @@ func TestKVTxnBlockWriteOperations(t *testing.T) {
func() { s.DeleteRange([]byte("foo"), nil) },
}
for i, tt := range tests {
tf := tt
txn := s.Write(traceutil.TODO())
done := make(chan struct{}, 1)
go func() {
tt()
tf()
done <- struct{}{}
}()
select {