mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
mvcc: fix race in TestKVTxnBlockWriteOperations
This commit is contained in:
parent
59f5fb25a5
commit
e5ddc91228
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user