Skip to content

sql/importer: further split TestImportIntoCSV to avoid shard timeout#167500

Open
mw5h wants to merge 1 commit intocockroachdb:masterfrom
mw5h:mw5h/fix-165847-split-import-into-csv
Open

sql/importer: further split TestImportIntoCSV to avoid shard timeout#167500
mw5h wants to merge 1 commit intocockroachdb:masterfrom
mw5h:mw5h/fix-165847-split-import-into-csv

Conversation

@mw5h
Copy link
Copy Markdown
Contributor

@mw5h mw5h commented Apr 3, 2026

Summary

TestImportIntoCSV contained 22 subtests (~15 success cases at ~60s each)
that collectively took ~15 minutes. When colocated with other tests on
the same Bazel shard, this exceeded the 15-minute timeout.

Split TestImportIntoCSV into three top-level functions so Bazel can
distribute them across shards:

  • TestImportIntoCSV: basic import and options tests (6 cases)
  • TestImportIntoCSVCompress: gzip/bzip compression and wildcard tests (9 cases)
  • TestImportIntoCSVErrors: error handling tests (7 cases)

The shared test loop body is extracted into runImportIntoCSVTestCases
to avoid duplicating it across the three functions.

Resolves: #165847
Epic: none

Release note: None

TestImportIntoCSV contained 22 subtests (~15 success cases at ~60s each)
that collectively took ~15 minutes. When colocated with other tests on
the same Bazel shard, this exceeded the 15-minute timeout.

Split TestImportIntoCSV into three top-level functions so Bazel can
distribute them across shards:

- TestImportIntoCSV: basic import and options tests (6 cases)
- TestImportIntoCSVCompress: gzip/bzip compression and wildcard tests
  (9 cases)
- TestImportIntoCSVErrors: error handling tests (7 cases)

Extract the shared test loop body into runImportIntoCSVTestCases to
avoid duplicating the ~70-line loop body across the three functions.

Resolves: cockroachdb#165847
Epic: none

Release note: None
@trunk-io
Copy link
Copy Markdown
Contributor

trunk-io bot commented Apr 3, 2026

Merging to master in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@mw5h mw5h marked this pull request as ready for review April 3, 2026 23:03
@mw5h mw5h requested a review from a team as a code owner April 3, 2026 23:03
@mw5h mw5h requested review from michae2 and removed request for a team April 3, 2026 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sql/importer: TestImportIntoCSV timed out

2 participants