Commit 3b51515 1 parent c20b95d commit 3b51515 Copy full SHA for 3b51515
File tree 2 files changed +4
-0
lines changed
2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change 8
8
"merge_test.go" ,
9
9
],
10
10
flaky = True ,
11
+ race = "on" ,
11
12
shard_count = 4 ,
12
13
deps = [
13
14
"//config" ,
Original file line number Diff line number Diff line change @@ -478,6 +478,7 @@ func TestAddIndexMergeConflictWithPessimistic(t *testing.T) {
478
478
callback := & callback.TestDDLCallback {Do : dom }
479
479
480
480
runPessimisticTxn := false
481
+ afterPessDML := make (chan struct {}, 1 )
481
482
callback .OnJobRunBeforeExported = func (job * model.Job ) {
482
483
if t .Failed () {
483
484
return
@@ -500,6 +501,7 @@ func TestAddIndexMergeConflictWithPessimistic(t *testing.T) {
500
501
assert .NoError (t , err )
501
502
_ , err = tk2 .Exec ("update t set a = 3 where id = 1;" )
502
503
assert .NoError (t , err )
504
+ afterPessDML <- struct {}{}
503
505
}
504
506
}
505
507
dom .DDL ().SetHook (callback )
@@ -515,6 +517,7 @@ func TestAddIndexMergeConflictWithPessimistic(t *testing.T) {
515
517
case <- afterCommit :
516
518
require .Fail (t , "should be blocked by the pessimistic txn" )
517
519
}
520
+ <- afterPessDML
518
521
tk2 .MustExec ("rollback;" )
519
522
<- afterCommit
520
523
dom .DDL ().SetHook (originHook )
You can’t perform that action at this time.
0 commit comments