Skip to content

Commit

Permalink
see if sleep error masks a different error
Browse files Browse the repository at this point in the history
  • Loading branch information
max-hoffman committed Dec 20, 2024
1 parent 49a0a99 commit 5982731
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -794,10 +794,10 @@ func TestHandlerKillQuery(t *testing.T) {
go func() {
defer wg.Done()
// need a local |err| variable to avoid being overwritten
serr := handler.ComQuery(context.Background(), conn1, sleepQuery, func(res *sqltypes.Result, more bool) error {
_ = handler.ComQuery(context.Background(), conn1, sleepQuery, func(res *sqltypes.Result, more bool) error {
return nil
})
require.Error(serr)
//require.Error(serr)
}()

var sleepQueryID string
Expand All @@ -806,6 +806,8 @@ func TestHandlerKillQuery(t *testing.T) {
// 2, , , test, Query, 0, running, SHOW PROCESSLIST
require.Equal(2, len(res.Rows))
hasSleepQuery := false
fmt.Println(res.Rows[0][0], res.Rows[0][4], res.Rows[0][7])
fmt.Println(res.Rows[1][0], res.Rows[1][4], res.Rows[1][7])
for _, row := range res.Rows {
if row[7].ToString() != sleepQuery {
continue
Expand Down

0 comments on commit 5982731

Please sign in to comment.