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

release-22.2.17-rc: importer: only check import *atomicity* in TestImportWorkerFailure #114055

Merged
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
11 changes: 8 additions & 3 deletions pkg/sql/importer/import_stmt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5253,10 +5253,15 @@ func TestImportWorkerFailure(t *testing.T) {
tc.StopServer(1)

close(allowResponse)
// We expect the statement to retry since it should have encountered a
// retryable error.
// We expect the IMPORT statement to usually retry since it should have
// encountered a retryable error. We don't currently catch all such retryable
// errors, however, so in some cases the IMPORT statement will return the
// error to the client. In this case we verify that the import was completely
// rolled back.
if err := <-errCh; err != nil {
t.Fatal(err)
t.Logf("%s failed, checking that imported data was completely removed: %q", query, err)
sqlDB.CheckQueryResults(t, `SELECT * FROM t ORDER BY i`, [][]string{})
return
}

// But the job should be restarted and succeed eventually.
Expand Down