Skip to content

chore: parallelize cpp integration tests#434

Merged
luoyuxia merged 1 commit intoapache:mainfrom
fresh-borzoni:parallel-cpp-tests
Mar 8, 2026
Merged

chore: parallelize cpp integration tests#434
luoyuxia merged 1 commit intoapache:mainfrom
fresh-borzoni:parallel-cpp-tests

Conversation

@fresh-borzoni
Copy link
Contributor

@fresh-borzoni fresh-borzoni commented Mar 7, 2026

Summary

closes #373
Parallelize C++ integration tests using CTest, matching the Rust test model.

Each test runs as a separate process via gtest_discover_tests().
The first process starts the Docker cluster, others detect it via port check and reuse it.

@fresh-borzoni
Copy link
Contributor Author

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR parallelizes the C++ integration tests by switching from a single add_test() invocation to CTest-driven per-test execution via gtest_discover_tests(), and updates the Docker-backed Fluss test cluster lifecycle so multiple test processes can share a single cluster instance.

Changes:

  • Discover and register each GoogleTest case as an individual CTest test to enable ctest -j parallelism.
  • Add a CTest fixtures cleanup hook (--cleanup) to stop Docker resources after the suite completes.
  • Update cluster startup logic to reuse an already-running local cluster (or one started by another parallel test process).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
bindings/cpp/test/test_utils.h Adds cluster reuse/“wait for other process” behavior, refactors bootstrap server setup, and changes teardown behavior.
bindings/cpp/test/test_main.cpp Adds --cleanup flag handling to stop Docker resources on fixture cleanup runs.
bindings/cpp/CMakeLists.txt Switches to gtest_discover_tests() and adds a FIXTURES_CLEANUP test for Docker cleanup.
.github/workflows/build_and_test_cpp.yml Runs C++ integration tests in parallel via ctest -j$(nproc).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fresh-borzoni
Copy link
Contributor Author

Answered copilot comments

Copy link
Contributor

@luoyuxia luoyuxia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fresh-borzoni Thanks for the pr. LGTM!

@luoyuxia luoyuxia merged commit d04d3fb into apache:main Mar 8, 2026
12 checks passed
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.

Run cpp integration tests in parallel

3 participants