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 322c01cbbf9b CAMEL-23921 - reduce flakiness for mina sftp tests
322c01cbbf9b is described below
commit 322c01cbbf9b414e7f6c95e2090a246e33531e85
Author: Aurélien Pupier <[email protected]>
AuthorDate: Fri Jul 10 14:07:12 2026 +0200
CAMEL-23921 - reduce flakiness for mina sftp tests
* one tests had tags not-parallel but this was not configured for this
component, it was surely a copy-paster from ftp component. Changed to
isolated which is used in this component.
* move to isolated SftpChangedReadLockIT which was flaky locally and
include a better error message to help investigate in case it still
happens
note1: wondering if we should not be enough to use @Isolated JUnit
annotation instead of a specific Maven config and specific @Tag
note 2: in case these changes are not enough to stabilize the tests, I
think we could try to remove the parallelism completely for all IT tests
on this module.
Signed-off-by: Aurélien Pupier <[email protected]>
---
.../file/remote/mina/integration/MinaSftpConcurrencyIT.java | 2 +-
.../camel/component/file/remote/mina/sftp/SftpChangedReadLockIT.java | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
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 0dc99188968a..5e93704084e4 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
@@ -40,7 +40,7 @@ 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("not-parallel")
+@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/sftp/SftpChangedReadLockIT.java
b/components/camel-mina-sftp/src/test/java/org/apache/camel/component/file/remote/mina/sftp/SftpChangedReadLockIT.java
index 8dffcdacf252..c8093450979c 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
@@ -18,12 +18,14 @@ package org.apache.camel.component.file.remote.mina.sftp;
import java.io.FileOutputStream;
import java.nio.file.Path;
+import java.util.Arrays;
import org.apache.camel.LoggingLevel;
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;
@@ -33,6 +35,7 @@ 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 {
@@ -65,7 +68,7 @@ public class SftpChangedReadLockIT extends
SftpServerTestSupport {
String content = context.getTypeConverter().convertTo(String.class,
testDirectory.resolve("out/slowfile.dat").toFile());
String[] lines = content.split(LS);
- assertEquals(20, lines.length, "There should be 20 lines in the file");
+ assertEquals(20, lines.length, "There should be 20 lines in the
file.\n" + Arrays.toString(lines));
for (int i = 0; i < 20; i++) {
assertEquals("Line " + i, lines[i]);
}