apupier opened a new pull request, #30215:
URL: https://github.com/apache/camel/pull/30215
## Summary
Follow-up of #30210 (CAMEL-26818). This PR balances the parallel test forks
and optimizes individual long tests in `camel-jbang-core` to further reduce
wall-clock build time on CI machines.
## Changes
1. **Split `ExportTest` into 4 balanced classes**:
- `ExportTest` (basic project generation and structure, ~17s)
- `ExportDependencyTest` (dependency resolution and Kamelets, ~26s)
- `ExportConsoleTest` (console, observability, Hawtio, dev profile, ~27s)
- `ExportPropertiesAndRepositoriesTest` (build/user properties, profiles,
repositories, ~17s)
- Shared helpers and lifecycle moved to `ExportBaseTestSupport`.
- Replaces the 82s single-class bottleneck with evenly balanced forks.
2. **Optimize long-running test classes**:
- `CatalogDocExamplesTest`: validate doc examples in parallel across
cores (21s -> 4s).
- `DependencyUpdateTest`: use pre-built fixture project instead of
repeated `Init`+`Export` calls.
- `ExportApiTest`: reduce repeated export GC release test iterations from
20 to 5 (6s -> 3s).
- `CliRunnerTest`: reduce busy command sleep and runner timeouts (6.3s ->
3.4s).
3. **Move isolated tests to parallel forks**:
- `LoadTest`: use isolated test home and work directory; remove
`@UsesWorkingDirectory`.
- `EvalSimpleTest`: remove `@UsesWorkingDirectory`.
- `InfraTest`: scope `@UsesFixedPort` to `runService()` method so the
other 3 test methods run in parallel.
4. **JVM tuning**:
- Added `-Xss256k` to `<camel.surefire.fork.additional-vmargs>` to reduce
per-thread memory footprint in test forks.
## Measurements
Local measurements with `taskset` (all tests passing):
| Configuration | 22 CPUs Wall | 22 CPUs CPU | 4 CPUs Wall | 4 CPUs CPU |
|---|---|---|---|---|
| Baseline (PR #30210) | 117 s (1m57s) | 5m40s | 131 s (2m11s) | 5m34s |
| After ExportTest split | 104 s (1m44s) | 6m12s | 114 s (1m54s) | 5m41s |
| After long test optimizations | 99 s (1m39s) | 6m27s | 111 s (1m51s) |
5m43s |
| After serial test moves & `-Xss256k` | **85.7 s (1m25s)** | **5m44s** |
**104.7 s (1m44s)** | **5m34s** |
Total gain: **~31 s faster wall time on 22 CPUs (>26%)**, **~26 s faster
wall time on 4 CPUs (>20%)**.
## Related
https://issues.apache.org/jira/browse/CAMEL-26818
---
_AI-assisted: IBM Bob 2.2.1 on behalf of Aurélien Pupier (@apupier)._
--
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]