yiguolei opened a new issue, #70852: URL: https://github.com/apache/doris/issues/70852
### Search before asking Searched existing issues for parallel BE UT / unit test execution; no matching enhancement was found. ### Description Run BE unit tests in parallel to reduce CI pipeline wall-clock time and shorten PR feedback cycles. Currently, `run-be-ut.sh --run` launches one `doris_be_test` process, whose GoogleTest cases execute sequentially through `RUN_ALL_TESTS()`. The script's `-j` option controls build parallelism only; it does not parallelize test execution. Individual tests and background services may create threads, but independent test cases are not scheduled concurrently by this runner. Source references: - [Test process launch in run-be-ut.sh](https://github.com/apache/doris/blob/598b967ff0fc4ddcb7f587f9e7c055ac6f569cdd/run-be-ut.sh#L599-L628) - [Build parallelism option](https://github.com/apache/doris/blob/598b967ff0fc4ddcb7f587f9e7c055ac6f569cdd/run-be-ut.sh#L120-L127) ### Solution Add configurable, bounded parallel test execution to `run-be-ut.sh` and enable it in the BE UT pipeline. Prefer separate worker processes, for example using GoogleTest sharding or a test scheduler, so each worker retains normal sequential GoogleTest execution. Implementation requirements: - Expose test concurrency separately from build `-j`, with concurrency 1 available for reproduction and debugging. - Preserve `--filter` semantics and ensure every selected test runs exactly once across workers. - Isolate writable resources between workers: temporary and data directories, logs, result XML files, coverage files, and service ports. Audit tests that use fixed paths or shared resources; fix their isolation or explicitly serialize them. - Bound concurrency according to available CPU and memory, including ASAN overhead and threads created inside each worker. - Collect all worker results into CI reports without overwriting artifacts. Any test failure, worker crash, or timeout must fail the job and retain useful logs and a reproducible test command. - Define behavior for existing special modes such as GDB, coverage, and expected-output generation; retain serial execution where concurrent execution is unsuitable. ### Acceptance criteria - The BE UT pipeline actually runs multiple test workers concurrently. - Serial and parallel runs on the same revision with the same filter execute the same set of tests, with no missing or duplicate cases. - Repeated parallel runs show no new failures caused by shared files, ports, or other resource conflicts. - Failure/crash/timeout handling and CI result aggregation work correctly. - Report a before/after comparison on the same CI hardware and build configuration: execution-only wall-clock time, overall job duration, worker count, and peak memory. Demonstrate reduced BE UT execution time without reducing test coverage or disabling ASAN. No speedup has been measured yet. ### Are you willing to submit PR? Not specified. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
