chore: parallelize cpp integration tests#434
Merged
luoyuxia merged 1 commit intoapache:mainfrom Mar 8, 2026
Merged
Conversation
c217d06 to
91f7aeb
Compare
91f7aeb to
f195171
Compare
Contributor
Author
There was a problem hiding this comment.
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 -jparallelism. - 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.
Contributor
Author
|
Answered copilot comments |
luoyuxia
approved these changes
Mar 8, 2026
Contributor
luoyuxia
left a comment
There was a problem hiding this comment.
@fresh-borzoni Thanks for the pr. LGTM!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.