CAMEL-23216 - remove concurrency for Mina sftp tests - #25043
Conversation
Mina Sftp tests are flaky. They are failing around 1 out of 10 times on Jenkins CI, so given that they are played on various combination, almost 1 out 2 times per job run on Jenkins CI. I'm unable to reproduce locally after launching 50 times. It is not always the same tests which is failing first, but after one is failing almost all others are failing. When going fine it takes 1 minutes on CI, when failing it takes 11 minutes. Locally when playing them it takes 47", when removing parallelism, it takes 4'30. So on CI, I expect it to take 5'30. This is not ideal but the most reasonable solution I found so far to mitigate the problem. These tests are currently the ones which are failing the most often on CI by far. Signed-off-by: Aurélien Pupier <apupier@ibm.com>
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
|
🧪 CI tested the following changed modules:
🔬 Scalpel shadow comparison — Scalpel: 9 tested, 29 compile-only — current: 9 all testedMaveniverse Scalpel detected 38 affected modules (current approach: 9).
|
gnodet
left a comment
There was a problem hiding this comment.
The approach of using reuseForks=false to give each test class its own JVM is sound and correctly eliminates the cross-class interference causing flakiness.
Verified:
- The fix correctly removes the
@Tag("isolated")mechanism and the two-execution failsafe setup in favor of a simplerreuseForks=falseapproach - JVM isolation prevents the
PathUtils.setUserHomeFolderResolver()global state mutation from leaking across test classes - CI passes with all tests green
- Git history confirms a clear progression: CAMEL-22379 → CAMEL-23921 → this PR (CAMEL-23216), each addressing more of the flakiness
Minor note: <camel.failsafe.parallel>true</camel.failsafe.parallel> is now effectively a no-op with reuseForks=false (each JVM has only one class). Consider setting it to false for clarity, though this is cosmetic.
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
Claude Code on behalf of Guillaume Nodet
Mina Sftp tests are flaky. They are failing around 1 out of 10 times on Jenkins CI, so given that they are played on various combination, almost 1 out 2 times per job run on Jenkins CI.
I'm unable to reproduce locally after launching 50 times.
It is not always the same tests which is failing first, but after one is failing almost all others are failing.
When going fine it takes 1 minutes on CI, when failing it takes 11 minutes.
Locally when playing them it takes 47", when removing parallelism, it takes 4'30. So on CI, I expect it to take 5'30. This is not ideal but the most reasonable solution I found so far to mitigate the problem. These tests are currently the ones which are failing the most often on CI by far.
Errors are mentioning things like: Cannot connect to mina-sftp://admin@localhost:42385
It is always on a different port so not a port conflict
Other opinions or ideas?
Description
Target
mainbranch)Tracking
Apache Camel coding standards and style
mvn clean install -DskipTestslocally from root folder and I have committed all auto-generated changes.AI-assisted contributions
Co-authored-bytrailers) and the PR description identifies the AI tool used.