Skip to content

Commit

Permalink
logictest: avoid FATAL during cleanup
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rafiss committed Aug 17, 2023
1 parent ef0002d commit 9d2c598
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/sql/logictest/logic.go
Original file line number Diff line number Diff line change
Expand Up @@ -3804,10 +3804,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)
}
Expand Down

0 comments on commit 9d2c598

Please sign in to comment.