Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logic: skip_on_retry works when errors are expected #106738

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pkg/ccl/logictestccl/testdata/logic_test/schema_change_in_txn
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion pkg/sql/logictest/logic.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 != "" {
Expand Down