Skip to content

Commit

Permalink
test: deflake TestQueryTimeoutWithTables (#11772)
Browse files Browse the repository at this point in the history
Signed-off-by: Harshit Gangal <harshit@planetscale.com>

Signed-off-by: Harshit Gangal <harshit@planetscale.com>
  • Loading branch information
harshit-gangal authored Nov 18, 2022
1 parent 64e5c33 commit 1d61c11
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions go/test/endtoend/vtgate/queries/misc/misc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ func TestQueryTimeoutWithTables(t *testing.T) {
// the query usually takes more than 5ms to return. So this should fail.
_, err := utils.ExecAllowError(t, mcmp.VtConn, "select /*vt+ PLANNER=gen4 QUERY_TIMEOUT_MS=1 */ count(*) from uks.unsharded where id1 > 31")
require.Error(t, err)
assert.Contains(t, err.Error(), "context deadline exceeded (errno 1317) (sqlstate 70100)")
assert.Contains(t, err.Error(), "context deadline exceeded")
assert.Contains(t, err.Error(), "(errno 1317) (sqlstate 70100)")

// sharded
for i := 0; i < 300000; i += 1000 {
Expand All @@ -152,5 +153,6 @@ func TestQueryTimeoutWithTables(t *testing.T) {
// the query usually takes more than 5ms to return. So this should fail.
_, err = utils.ExecAllowError(t, mcmp.VtConn, "select /*vt+ PLANNER=gen4 QUERY_TIMEOUT_MS=1 */ count(*) from t1 where id1 > 31")
require.Error(t, err)
assert.Contains(t, err.Error(), "context deadline exceeded (errno 1317) (sqlstate 70100)")
assert.Contains(t, err.Error(), "context deadline exceeded")
assert.Contains(t, err.Error(), "(errno 1317) (sqlstate 70100)")
}

0 comments on commit 1d61c11

Please sign in to comment.