diff --git a/pkg/ccl/logictestccl/testdata/logic_test/schema_change_in_txn b/pkg/ccl/logictestccl/testdata/logic_test/schema_change_in_txn index e89155928a90..702ad5075e02 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/schema_change_in_txn +++ b/pkg/ccl/logictestccl/testdata/logic_test/schema_change_in_txn @@ -1,3 +1,7 @@ +# Skip the rest of the test if a retry occurs. They can happen and are fine +# but there's no way to encapsulate that in logictests. +skip_on_retry + # Backing up and restoring a descriptor will increment the version of the # descriptor before restoring it so we cannot achieve the expected behaviour in # this test. diff --git a/pkg/sql/logictest/logic.go b/pkg/sql/logictest/logic.go index 5e1980993ff9..06527ddd2f48 100644 --- a/pkg/sql/logictest/logic.go +++ b/pkg/sql/logictest/logic.go @@ -3130,8 +3130,8 @@ func (t *logicTest) maybeSkipOnRetry(err error) { func (t *logicTest) verifyError( sql, pos, expectNotice, expectErr, expectErrCode string, err error, ) (bool, error) { + t.maybeSkipOnRetry(err) if expectErr == "" && expectErrCode == "" && err != nil { - t.maybeSkipOnRetry(err) return t.unexpectedError(sql, pos, err) } if expectNotice != "" {