This is an automated email from the ASF dual-hosted git repository.

apupier pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new adb5ef4e7e26 CAMEL-23216 - remove concurrency for Mina sftp tests
adb5ef4e7e26 is described below

commit adb5ef4e7e2642bf1b60c28a3fe8ae34534207f6
Author: AurĂ©lien Pupier <[email protected]>
AuthorDate: Thu Jul 23 09:44:02 2026 +0200

    CAMEL-23216 - remove concurrency for Mina sftp tests
    
    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 <[email protected]>
---
 components/camel-mina-sftp/pom.xml                     | 18 ------------------
 .../remote/mina/integration/MinaSftpConcurrencyIT.java |  2 --
 .../integration/MinaSftpConfigurationValidationIT.java | 16 ----------------
 .../file/remote/mina/sftp/SftpChangedReadLockIT.java   |  2 --
 4 files changed, 38 deletions(-)

diff --git a/components/camel-mina-sftp/pom.xml 
b/components/camel-mina-sftp/pom.xml
index 6478974f5bbf..4c14f2f46a27 100644
--- a/components/camel-mina-sftp/pom.xml
+++ b/components/camel-mina-sftp/pom.xml
@@ -120,29 +120,11 @@
                         <artifactId>maven-failsafe-plugin</artifactId>
                         <executions>
                             <execution>
-                                <id>standard-integration-tests</id>
                                 <goals>
                                     <goal>integration-test</goal>
                                     <goal>verify</goal>
                                 </goals>
                                 <configuration>
-                                    <excludedGroups>isolated</excludedGroups>
-    <!--                                <forkCount>1</forkCount>
-                                    <reuseForks>true</reuseForks> -->
-                                </configuration>
-                            </execution>
-                            <execution>
-                                <id>default</id>
-                                <phase>none</phase>
-                            </execution>
-                            <execution>
-                                <id>isolated-integration-tests</id>
-                                <goals>
-                                    <goal>integration-test</goal>
-                                    <goal>verify</goal>
-                                </goals>
-                                <configuration>
-                                    <groups>isolated</groups>
                                     <forkCount>1</forkCount>
                                     <reuseForks>false</reuseForks>
                                 </configuration>
diff --git 
a/components/camel-mina-sftp/src/test/java/org/apache/camel/component/file/remote/mina/integration/MinaSftpConcurrencyIT.java
 
b/components/camel-mina-sftp/src/test/java/org/apache/camel/component/file/remote/mina/integration/MinaSftpConcurrencyIT.java
index c538050aa810..bde4f3dc1255 100644
--- 
a/components/camel-mina-sftp/src/test/java/org/apache/camel/component/file/remote/mina/integration/MinaSftpConcurrencyIT.java
+++ 
b/components/camel-mina-sftp/src/test/java/org/apache/camel/component/file/remote/mina/integration/MinaSftpConcurrencyIT.java
@@ -26,7 +26,6 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.camel.Exchange;
-import org.junit.jupiter.api.Tag;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.Timeout;
 import org.junit.jupiter.api.condition.EnabledIf;
@@ -40,7 +39,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
  * Integration tests for MINA SFTP concurrency and thread safety.
  */
 @EnabledIf(value = 
"org.apache.camel.test.infra.ftp.services.embedded.SftpUtil#hasRequiredAlgorithms('src/test/resources/hostkey.pem')")
-@Tag("isolated")
 public class MinaSftpConcurrencyIT extends MinaSftpServerTestSupport {
 
     private static final Logger log = 
LoggerFactory.getLogger(MinaSftpConcurrencyIT.class);
diff --git 
a/components/camel-mina-sftp/src/test/java/org/apache/camel/component/file/remote/mina/integration/MinaSftpConfigurationValidationIT.java
 
b/components/camel-mina-sftp/src/test/java/org/apache/camel/component/file/remote/mina/integration/MinaSftpConfigurationValidationIT.java
index 96246f06ccec..6bdfaae51407 100644
--- 
a/components/camel-mina-sftp/src/test/java/org/apache/camel/component/file/remote/mina/integration/MinaSftpConfigurationValidationIT.java
+++ 
b/components/camel-mina-sftp/src/test/java/org/apache/camel/component/file/remote/mina/integration/MinaSftpConfigurationValidationIT.java
@@ -27,7 +27,6 @@ import org.apache.camel.ResolveEndpointFailedException;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.sshd.common.util.io.PathUtils;
 import org.junit.jupiter.api.AfterAll;
-import org.junit.jupiter.api.Tag;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.Timeout;
 import org.junit.jupiter.api.condition.EnabledIf;
@@ -41,20 +40,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
 /**
  * Integration tests for MINA SFTP configuration validation and error messages.
  * <p>
- * <b>Why this test requires isolation:</b> This test class modifies the global
- * {@code PathUtils.setUserHomeFolderResolver()} to test username resolution 
fallback behavior. MINA SSHD's
- * {@code PathUtils} lazily caches the home folder path on first access via 
{@code DefaultConfigFileHostEntryResolver},
- * and this cache cannot be reset once populated. Running this test in a 
shared JVM with other tests would cause
- * interference.
- * <p>
- * <b>How isolation is achieved:</b> The {@code @Tag("isolated")} annotation 
marks this class for separate execution.
- * The Maven Failsafe plugin is configured in pom.xml with two executions:
- * <ul>
- * <li>{@code standard-integration-tests} - runs all tests EXCEPT those tagged 
"isolated"</li>
- * <li>{@code isolated-integration-tests} - runs ONLY tests tagged "isolated" 
with {@code reuseForks=false} to ensure a
- * fresh JVM</li>
- * </ul>
- * <p>
  * <b>Username resolution fallback:</b> When no username is specified in the 
URI, MINA SSHD (like JSch/camel-sftp) uses
  * this priority order:
  * <ol>
@@ -67,7 +52,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
  *      
"https://github.com/apache/mina-sshd/blob/master/sshd-common/src/main/java/org/apache/sshd/client/config/hosts/HostConfigEntry.java";>MINA
  *      SSHD HostConfigEntry</a>
  */
-@Tag("isolated")
 @EnabledIf(value = 
"org.apache.camel.test.infra.ftp.services.embedded.SftpUtil#hasRequiredAlgorithms('src/test/resources/hostkey.pem')")
 public class MinaSftpConfigurationValidationIT extends 
MinaSftpServerTestSupport {
 
diff --git 
a/components/camel-mina-sftp/src/test/java/org/apache/camel/component/file/remote/mina/sftp/SftpChangedReadLockIT.java
 
b/components/camel-mina-sftp/src/test/java/org/apache/camel/component/file/remote/mina/sftp/SftpChangedReadLockIT.java
index c8093450979c..ae3d64ccd5ec 100644
--- 
a/components/camel-mina-sftp/src/test/java/org/apache/camel/component/file/remote/mina/sftp/SftpChangedReadLockIT.java
+++ 
b/components/camel-mina-sftp/src/test/java/org/apache/camel/component/file/remote/mina/sftp/SftpChangedReadLockIT.java
@@ -25,7 +25,6 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.spi.PropertiesComponent;
 import org.apache.camel.test.junit6.TestSupport;
-import org.junit.jupiter.api.Tag;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.condition.EnabledIf;
 import org.junit.jupiter.api.io.TempDir;
@@ -35,7 +34,6 @@ import org.slf4j.LoggerFactory;
 import static org.apache.camel.test.junit6.TestSupport.createDirectory;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
-@Tag("isolated")
 @EnabledIf(value = 
"org.apache.camel.test.infra.ftp.services.embedded.SftpUtil#hasRequiredAlgorithms('src/test/resources/sftp/hostkey.pem')")
 public class SftpChangedReadLockIT extends SftpServerTestSupport {
 

Reply via email to