From 01e574a680dbd531799a9efad7b7b8b768484809 Mon Sep 17 00:00:00 2001 From: Bergin Dedej Date: Tue, 14 May 2024 10:45:34 -0400 Subject: [PATCH] sql/schema_changer_test.go not checking err, fix for linting issue Methods that returned an err were not checked in PR #123414 which is causing an failure with our lint test, this PR contains those err checks. Informs: #123414 Release note: None --- pkg/sql/schema_changer_test.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkg/sql/schema_changer_test.go b/pkg/sql/schema_changer_test.go index 5b1e49eddbe4..f17d81205ba2 100644 --- a/pkg/sql/schema_changer_test.go +++ b/pkg/sql/schema_changer_test.go @@ -7839,11 +7839,14 @@ func TestLeaseTimeoutWithConcurrentTransactions(t *testing.T) { sqlRunner.Exec(t, `CREATE TABLE RIDES (my_int INT);`) txn1 := sqlRunner.Begin(t) - txn1.Exec(`SELECT * FROM PROMO_CODES;`) + _, err := txn1.Exec(`SELECT * FROM PROMO_CODES;`) + require.NoError(t, err) txn2 := sqlRunner.Begin(t) - txn2.Exec(`GRANT ALL ON TABLE PROMO_CODES TO ROACHMIN;`) - txn2.Exec(`GRANT ALL ON TABLE RIDES TO ROACHMIN;`) + _, err = txn2.Exec(`GRANT ALL ON TABLE PROMO_CODES TO ROACHMIN;`) + require.NoError(t, err) + _, err = txn2.Exec(`GRANT ALL ON TABLE RIDES TO ROACHMIN;`) + require.NoError(t, err) blocker := make(chan struct{}) group := ctxgroup.WithContext(ctx) @@ -7855,7 +7858,7 @@ func TestLeaseTimeoutWithConcurrentTransactions(t *testing.T) { }) <-blocker - _, err := txn1.Exec("INSERT INTO promo_codes values (1)") + _, err = txn1.Exec("INSERT INTO promo_codes values (1)") require.NoError(t, err) // txn1.commit() completes with an error due to lease timeout on txn2.commit().