This is an automated email from the ASF dual-hosted git repository. orpiske pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit ec999c6ca21b84598f0330bbc0e1beb028b16715 Author: Otavio Rodolfo Piske <[email protected]> AuthorDate: Tue Aug 20 11:28:19 2024 +0200 CAMEL-21098: prevent incorrectly trying to reuse the same NamespacedHierarchicalStore --- .../FromFtpRemoteFileSortByIgnoreCaseExpressionIT.java | 2 -- .../file/remote/integration/FtpBrowsableEndpointIT.java | 2 -- .../file/remote/integration/FtpProducerMoveExistingIT.java | 2 -- .../remote/sftp/integration/SftpProducerMoveExistingIT.java | 2 -- .../sftp/integration/SftpSimpleProduceThroughProxyIT.java | 10 ++++------ 5 files changed, 4 insertions(+), 14 deletions(-) diff --git a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/integration/FromFtpRemoteFileSortByIgnoreCaseExpressionIT.java b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/integration/FromFtpRemoteFileSortByIgnoreCaseExpressionIT.java index 8791820446d..08252643774 100644 --- a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/integration/FromFtpRemoteFileSortByIgnoreCaseExpressionIT.java +++ b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/integration/FromFtpRemoteFileSortByIgnoreCaseExpressionIT.java @@ -19,12 +19,10 @@ package org.apache.camel.component.file.remote.integration; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.MockEndpoint; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestInstance; /** * Unit test to verify remotefile sortby option. */ -@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class FromFtpRemoteFileSortByIgnoreCaseExpressionIT extends FtpServerTestSupport { private String getFtpUrl() { diff --git a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/integration/FtpBrowsableEndpointIT.java b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/integration/FtpBrowsableEndpointIT.java index 5a395b02db9..04e2f1503a1 100644 --- a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/integration/FtpBrowsableEndpointIT.java +++ b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/integration/FtpBrowsableEndpointIT.java @@ -25,7 +25,6 @@ import org.apache.camel.spi.BrowsableEndpoint; import org.apache.camel.support.processor.idempotent.MemoryIdempotentRepository; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestInstance; import static org.apache.camel.test.junit5.TestSupport.assertFileExists; import static org.apache.camel.test.junit5.TestSupport.createDirectory; @@ -33,7 +32,6 @@ import static org.apache.camel.test.junit5.TestSupport.deleteDirectory; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; -@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class FtpBrowsableEndpointIT extends FtpServerTestSupport { private Path browseDir; diff --git a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/integration/FtpProducerMoveExistingIT.java b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/integration/FtpProducerMoveExistingIT.java index 1e5e9132707..9562f473ffb 100644 --- a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/integration/FtpProducerMoveExistingIT.java +++ b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/integration/FtpProducerMoveExistingIT.java @@ -28,7 +28,6 @@ import org.apache.camel.Exchange; import org.apache.camel.component.file.GenericFileOperationFailedException; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestInstance; import static org.apache.camel.test.junit5.TestSupport.assertFileExists; import static org.apache.camel.test.junit5.TestSupport.assertFileNotExists; @@ -38,7 +37,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; -@TestInstance(TestInstance.Lifecycle.PER_CLASS) public class FtpProducerMoveExistingIT extends FtpServerTestSupport { private String getFtpUrl() { return "ftp://admin@localhost:{{ftp.server.port}}/move?password=admin&fileExist=Move"; diff --git a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/integration/SftpProducerMoveExistingIT.java b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/integration/SftpProducerMoveExistingIT.java index 3b3bd8b4503..96c6bc6e7ee 100644 --- a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/integration/SftpProducerMoveExistingIT.java +++ b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/integration/SftpProducerMoveExistingIT.java @@ -21,7 +21,6 @@ import org.apache.camel.Exchange; import org.apache.camel.component.file.GenericFileOperationFailedException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestInstance; import org.junit.jupiter.api.condition.EnabledIf; import static org.apache.camel.test.junit5.TestSupport.assertFileExists; @@ -32,7 +31,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; -@TestInstance(TestInstance.Lifecycle.PER_CLASS) @EnabledIf(value = "org.apache.camel.test.infra.ftp.services.embedded.SftpUtil#hasRequiredAlgorithms('src/test/resources/hostkey.pem')") public class SftpProducerMoveExistingIT extends SftpServerTestSupport { diff --git a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/integration/SftpSimpleProduceThroughProxyIT.java b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/integration/SftpSimpleProduceThroughProxyIT.java index a06531ad7df..9dccdfbf44f 100644 --- a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/integration/SftpSimpleProduceThroughProxyIT.java +++ b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/integration/SftpSimpleProduceThroughProxyIT.java @@ -22,10 +22,9 @@ import com.jcraft.jsch.ProxyHTTP; import org.apache.camel.BindToRegistry; import org.apache.camel.Exchange; import org.apache.camel.test.AvailablePortFinder; -import org.junit.jupiter.api.AfterAll; -import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestInstance; import org.junit.jupiter.api.condition.EnabledIf; import org.littleshoot.proxy.HttpProxyServer; import org.littleshoot.proxy.ProxyAuthenticator; @@ -34,14 +33,13 @@ import org.littleshoot.proxy.impl.DefaultHttpProxyServer; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; -@TestInstance(TestInstance.Lifecycle.PER_CLASS) @EnabledIf(value = "org.apache.camel.test.infra.ftp.services.embedded.SftpUtil#hasRequiredAlgorithms('src/test/resources/hostkey.pem')") public class SftpSimpleProduceThroughProxyIT extends SftpServerTestSupport { private static HttpProxyServer proxyServer; private final int proxyPort = AvailablePortFinder.getNextAvailable(); - @BeforeAll + @BeforeEach public void setupProxy() { proxyServer = DefaultHttpProxyServer.bootstrap() .withPort(proxyPort) @@ -58,7 +56,7 @@ public class SftpSimpleProduceThroughProxyIT extends SftpServerTestSupport { }).start(); } - @AfterAll + @AfterEach public void cleanup() { proxyServer.stop(); }
