Skip to content

Run Bazel tests in parallel in CI - #3482

Draft
wasphin wants to merge 5 commits into
apache:masterfrom
wasphin:optimize-ci-bazel-tests
Draft

Run Bazel tests in parallel in CI#3482
wasphin wants to merge 5 commits into
apache:masterfrom
wasphin:optimize-ci-bazel-tests

Conversation

@wasphin

@wasphin wasphin commented Aug 23, 2026

Copy link
Copy Markdown
Member

What problem does this PR solve?

Issue Number: resolve

Problem Summary:

The Clang Bazel unit-test job uses streamed test output for the full test suite. Bazel runs streamed tests locally and serially, which prevents independent test targets from running in parallel and makes this job a CI critical path.

Some tests also rely on fixed ports, TCP response packet boundaries, or Bazel's default timeout, which makes them unreliable when independent targets run concurrently.

What is changed and the side effects?

Changed:

  • Change the Clang Bazel unit-test output mode from streamed to errors so Bazel can schedule independent test targets in parallel.
  • Use ephemeral ports in the interceptor and HTTP expect tests.
  • Preserve HTTP responses already buffered from the same connection between reads.
  • Declare the protobuf JSON test as a large Bazel test so its timeout reflects its existing runtime under CI contention.
  • Preserve failure diagnostics: failed test output is printed and complete test logs remain available under bazel-testlogs.

Side effects:

  • Performance effects: Reduces the wall-clock duration of the Clang Bazel unit-test job by enabling normal Bazel test parallelism.

  • Breaking backward compatibility: No. The production library is unchanged; this updates CI scheduling and test robustness.


Check List:

@wwbmmm

wwbmmm commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

LGTM

@wasphin
wasphin marked this pull request as draft August 24, 2026 15:01
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.

2 participants