Skip to content

Commit

Permalink
ddl: stabilize TestRenameTableIntermediateState
Browse files Browse the repository at this point in the history
  • Loading branch information
tangenta committed May 15, 2023
1 parent 433ac5c commit 2fbcf59
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ddl/table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -553,9 +553,11 @@ func TestRenameTableIntermediateState(t *testing.T) {
hook := &callback.TestDDLCallback{Do: dom}
runInsert := false
fn := func(job *model.Job) {
if job.SchemaState == model.StatePublic && !runInsert && !t.Failed() {
if job.Type == model.ActionRenameTable &&
job.SchemaState == model.StatePublic && !runInsert && !t.Failed() {
_, err := tk2.Exec(tc.insertSQL)
if len(tc.errMsg) > 0 {
assert.NotNil(t, err)
assert.Equal(t, tc.errMsg, err.Error())
} else {
assert.NoError(t, err)
Expand Down

0 comments on commit 2fbcf59

Please sign in to comment.