From 8512e384e69554ff8413996cabdef90d3f2d28b6 Mon Sep 17 00:00:00 2001 From: Rafi Shamim Date: Thu, 6 Apr 2023 17:18:33 +0000 Subject: [PATCH] roachtest: fix assertion in drain test Sometimes the cluster settings are available when there's only one node left in the cluster, so we shouldn't always check that it failed to find them. Release note: None --- pkg/cmd/roachtest/tests/drain.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cmd/roachtest/tests/drain.go b/pkg/cmd/roachtest/tests/drain.go index e1741541fea0..747e0ff923a7 100644 --- a/pkg/cmd/roachtest/tests/drain.go +++ b/pkg/cmd/roachtest/tests/drain.go @@ -335,7 +335,7 @@ func runClusterNotAtQuorum(ctx context.Context, t test.Test, c cluster.Cluster) "./cockroach node drain --self --insecure --drain-wait=10s", ) t.L().Printf("drain output:\n%s\n%s\n", results.Stdout, results.Stderr) - require.Contains(t, results.Stderr, "could not check drain related cluster settings") + require.Regexp(t, "(cluster settings require a value of at least|could not check drain related cluster settings)", results.Stderr) } // prepareCluster is to start the server on nodes in the given cluster, and set