From a46a79a981c2e9ce4c954dcdb16e26e54239990d Mon Sep 17 00:00:00 2001 From: Rafi Shamim Date: Thu, 17 Aug 2023 18:46:56 +0000 Subject: [PATCH] logictest: avoid FATAL during cleanup This prevents the test from failing if there is an error closing a connection at the end of the test. There is no strong need for us to assert that closing the connection worked. Release note: None --- pkg/sql/logictest/logic.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/sql/logictest/logic.go b/pkg/sql/logictest/logic.go index c034937a05fc..bd7f0ad9335a 100644 --- a/pkg/sql/logictest/logic.go +++ b/pkg/sql/logictest/logic.go @@ -3828,10 +3828,10 @@ func (t *logicTest) validateAfterTestCompletion() error { if user == username.RootUser { continue } - for i, c := range userClients { - if err := c.Close(); err != nil { - t.Fatalf("failed to close connection to node %d for user %s: %v", i, user, err) - } + for _, c := range userClients { + // Ignore the error from closing the connection. This may not succeed if, + // for example, CANCEL SESSION was called on one of the sessions. + _ = c.Close() } delete(t.clients, user) }