tkobayas commented on PR #6864: URL: https://github.com/apache/incubator-kie/pull/6864#issuecomment-5238293557
# Parallel Test Concerns (`-T 2` verify approach) ## Current Results (CI run `85049074080`) | | Java 17 | Java 21 | Baseline (sequential) | |---|---|---|---| | Phase 1 (install) | 43 min | 42 min | — | | Phase 2 (verify `-T 2`) | 1h48m | 1h41m | — | | **Total** | **2h31m** | **2h23m** | **~2h09m** | | Tests passed | 34818 | 34823 | — | | Failures / Errors | 0 / 0 | 0 / 0 | — | Total time is **~20 min slower** than the sequential baseline because Phase 2 includes lifecycle overhead (quarkus:build, packaging, plugin initialization) that the baseline's single `mvn install` avoids by interleaving compilation and testing. ## Parallelism Efficiency | Metric | Value | |---|---| | Total sequential test time | 156 min | | Phase 2 wall clock (`-T 2`) | 108 min | | Speedup factor | 1.44x | | Ideal 2-thread speedup | 2.0x (78 min) | | Lost to lifecycle overhead | ~30 min | ## Bottleneck: Deep Dependency Chains in Modules 500–853 The reactor splits into two distinct zones: - **Modules 1–500** (drools-core, compiler, model, DMN, PMML, etc.): 31 min. Many independent modules → good parallelism. ~16 modules/min. - **Modules 500–853** (Kogito, Quarkus ITs, Spring Boot ITs): 77 min. Deep dependency chains → near-sequential execution. ~4–6 modules/min. **34.8 min of measured thread idle time** (gaps >30s where only 1 of 2 threads was active). The dependency graph forces sequential ordering in the tail: ``` kogito-api → kogito-quarkus-common → kogito-quarkus-rules-extension → integration-tests-quarkus-rules → ... ``` With `-T 2`, the second thread sits idle waiting for these chains to complete. Note: In theory, the two-phase approach (Phase 1 installs all artifacts to `~/.m2/repository`, Phase 2 only runs tests) means module B's tests do not actually need module A's Phase 2 to complete — the dependency is already satisfied by the installed artifact. However, **Maven's `-T` multi-threaded builder always enforces the reactor dependency graph regardless of what is already in the local repository.** It does not distinguish between "build" and "test-only" phases for scheduling purposes. This means the ~35 min of thread idle time is an artificial constraint imposed by Maven's scheduler, not a real dependency, but we cannot easily overcome it within a single Maven invocation. ## Disabled Tests (8 total) These tests were disabled to make the `-T 2` build pass. They fail under parallel execution due to CPU contention on 4-core GHA runners. Fixing them requires separate effort. | Test | How | Why | |------|-----|-----| | `OptaPlannerDevUITest` | `<skipTests>` in pom | DevUI WebSocket port mismatch under random ports | | `QuarkusEventThreadPoolTest` | `@Disabled` | Thread pool timing sensitivity | | `QuarkusTransactionRollbackTest` | `@Disabled` | Transaction status race condition | | `ProcessDataIndexPostgreSqlIT` | `@Disabled` | Testcontainers startup timeout | | `VertxJobSchedulerTest.testExactTime` | `@Disabled` | Timing-sensitive assertion | | `JDBCOptimisticLockingIT` | `@Disabled` | Awaitility timeout under CPU contention | | `KSinkInjectionHealthCheckDisabledIT` | `@Disabled` | Re-augmentation ClassNotFoundException on Java 21 | | MongoDB integration test module | `<skipTests>` + `<skipITs>` in pom | Forked process hang | -- 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]
