Skip to content

Commit 112556b

Browse files
committed
add sleeps back
1 parent 5982731 commit 112556b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

server/handler_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,7 @@ func TestHandlerKillQuery(t *testing.T) {
800800
//require.Error(serr)
801801
}()
802802

803+
time.Sleep(100 * time.Millisecond)
803804
var sleepQueryID string
804805
err = handler.ComQuery(context.Background(), conn2, "SHOW PROCESSLIST", func(res *sqltypes.Result, more bool) error {
805806
// 1, , , test, Query, 0, ... , SELECT SLEEP(1000)
@@ -824,11 +825,13 @@ func TestHandlerKillQuery(t *testing.T) {
824825
})
825826
require.NoError(err)
826827

828+
time.Sleep(100 * time.Millisecond)
827829
err = handler.ComQuery(context.Background(), conn2, "KILL QUERY "+sleepQueryID, func(res *sqltypes.Result, more bool) error {
828830
return nil
829831
})
830832
require.NoError(err)
831833
wg.Wait()
834+
time.Sleep(100 * time.Millisecond)
832835
err = handler.ComQuery(context.Background(), conn2, "SHOW PROCESSLIST", func(res *sqltypes.Result, more bool) error {
833836
// 1, , , test, Sleep, 0, ,
834837
// 2, , , test, Query, 0, running, SHOW PROCESSLIST

0 commit comments

Comments
 (0)