From b1eee3fbbc9c701a1a1e734fd964d1a1e74c007b Mon Sep 17 00:00:00 2001 From: Dirkjan Bussink Date: Wed, 1 Nov 2023 17:05:51 +0100 Subject: [PATCH] vtgate: Allow more errors for the warning check The MySQL shutdown is racy, so we might also see this message that it's still shutting down. Improves the test flakyness hopefully of these tests. Signed-off-by: Dirkjan Bussink --- go/test/endtoend/vtgate/errors_as_warnings/main_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go/test/endtoend/vtgate/errors_as_warnings/main_test.go b/go/test/endtoend/vtgate/errors_as_warnings/main_test.go index a2446c1df87..20861d354a0 100644 --- a/go/test/endtoend/vtgate/errors_as_warnings/main_test.go +++ b/go/test/endtoend/vtgate/errors_as_warnings/main_test.go @@ -141,9 +141,9 @@ func TestScatterErrsAsWarns(t *testing.T) { utils.Exec(t, mode.conn, fmt.Sprintf("set workload = %s", mode.m)) utils.AssertMatches(t, mode.conn, query1, `[[INT64(4)]]`) - assertContainsOneOf(t, mode.conn, showQ, "no valid tablet", "no healthy tablet", "mysql.sock: connect: no such file or directory") + assertContainsOneOf(t, mode.conn, showQ, "operation not allowed in state SHUTTING_DOWN", "no valid tablet", "no healthy tablet", "mysql.sock: connect: no such file or directory") utils.AssertMatches(t, mode.conn, query2, `[[INT64(4)]]`) - assertContainsOneOf(t, mode.conn, showQ, "no valid tablet", "no healthy tablet", "mysql.sock: connect: no such file or directory") + assertContainsOneOf(t, mode.conn, showQ, "operation not allowed in state SHUTTING_DOWN", "no valid tablet", "no healthy tablet", "mysql.sock: connect: no such file or directory") // invalid_field should throw error and not warning _, err = mode.conn.ExecuteFetch("SELECT /*vt+ PLANNER=Gen4 SCATTER_ERRORS_AS_WARNINGS */ invalid_field from t1;", 1, false)