Repository navigation
chore: camel-plc4x - run Plc4XRepeatedFailureRouteTest isolated - #28559
Conversation
LogCapture sets the level of a logger for the whole JVM and MockDriver is programmed statically, so the test must not run in parallel with other test classes when JUnit parallel execution is turned on. Follow-up of the review of #28556. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
oscerd
left a comment
There was a problem hiding this comment.
Correct test-hygiene follow-up. Plc4XRepeatedFailureRouteTest asserts on captured log levels via LogCapture (which sets a logger's level JVM-wide) and uses the statically-programmed MockDriver, so it mutates process-global state — @Isolated is exactly the right JUnit 5 mechanism to keep it from running in parallel with other test classes, and the added doc note on LogCapture makes the constraint explicit for future callers. Small and clearly correct.
No blockers.
Claude Code on behalf of oscerd
gnodet-bot
left a comment
There was a problem hiding this comment.
LGTM. @Isolated is the correct JUnit 5 mechanism here — it guarantees Plc4XRepeatedFailureRouteTest runs in its own execution group with no other test class running concurrently, which is exactly what's needed given LogCapture's JVM-global logger level mutation and MockDriver's static state. The added LogCapture Javadoc makes the constraint explicit for future consumers. No issues found.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
|
🧪 CI tested the following changed modules:
🔁 1 test passed only after a retry on JDK 21 (1 retried attempt) Recovered flaky tests on JDK 21 (1)
🔬 Scalpel shadow comparison — Scalpel: 1 of 708 tested, 0 compile-only — current: 8 all testedMaveniverse Scalpel detected 1 affected modules (current approach: 8). Skip-tests mode would test 1 modules (1 direct + 0 downstream), skip tests for 0 (generated code, meta-modules) Modules only in current approach (7)
Modules Scalpel would test (1)
All tested modules (8 modules, 2m 22s total)Total reactor time: 2m 22s
Top 20 slowest modules:
|
Description
Follow-up of the gnodet-bot review on #28556 (CAMEL-26339).
LogCapturesets the level of a logger for the whole JVM, andMockDriveris programmed statically. SoPlc4XRepeatedFailureRouteTestis now@Isolatedand does not run at the same time as other test classes when JUnit parallel execution is on (camel.surefire.parallel=true). The Javadoc ofLogCapturesays so too. Test-only change.Verification:
mvn testincomponents/camel-plc4xwith-Dcamel.surefire.parallel=true -Dcamel.surefire.parallel.factor=4 -Dsurefire.rerunFailingTestsCount=0: 43 tests green, andPlc4XRepeatedFailureRouteTestran alone after the other classes.Claude Code on behalf of davsclaus
🤖 Generated with Claude Code