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


The following commit(s) were added to refs/heads/main by this push:
     new fa54d30  CAMEL-17623: remove deprecated camel-testcontainers-spring 
component
fa54d30 is described below

commit fa54d30a16f9cc0418ac9d472bc59c52a3b2e5a9
Author: Otavio Rodolfo Piske <[email protected]>
AuthorDate: Thu Feb 10 09:28:33 2022 +0100

    CAMEL-17623: remove deprecated camel-testcontainers-spring component
---
 .../org/apache/camel/catalog/others.properties     |   1 -
 .../catalog/others/testcontainers-spring.json      |  15 ---
 .../camel-test/camel-testcontainers-spring/pom.xml | 146 ---------------------
 .../services/org/apache/camel/other.properties     |   7 -
 .../generated/resources/testcontainers-spring.json |  15 ---
 .../src/main/docs/testcontainers-spring.adoc       |  15 ---
 .../spring/ContainerAwareSpringTestSupport.java    | 117 -----------------
 .../spring/ContainerAwareSpringTestSupportIT.java  |  62 ---------
 .../src/test/resources/log4j2.properties           |  30 -----
 .../spring/ContainerAwareSpringTestSupportTest.xml |  33 -----
 components/camel-test/pom.xml                      |   1 -
 .../examples/json/testcontainers-spring.json       |   1 -
 docs/components/modules/others/nav.adoc            |   1 -
 .../others/pages/testcontainers-spring.adoc        |   1 -
 14 files changed, 445 deletions(-)

diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties
index 4b500d3..7604444 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties
@@ -57,7 +57,6 @@ test-spring
 test-spring-junit5
 testcontainers
 testcontainers-junit5
-testcontainers-spring
 threadpoolfactory-vertx
 tracing
 undertow-spring-security
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/testcontainers-spring.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/testcontainers-spring.json
deleted file mode 100644
index 5c306fc..0000000
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/testcontainers-spring.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-  "other": {
-    "kind": "other",
-    "name": "testcontainers-spring",
-    "title": "Testcontainers Spring",
-    "description": "Camel unit testing with Spring and testcontainers",
-    "deprecated": true,
-    "firstVersion": "2.22.0",
-    "label": "testing,java,docker",
-    "supportLevel": "Stable",
-    "groupId": "org.apache.camel",
-    "artifactId": "camel-testcontainers-spring",
-    "version": "3.16.0-SNAPSHOT"
-  }
-}
diff --git a/components/camel-test/camel-testcontainers-spring/pom.xml 
b/components/camel-test/camel-testcontainers-spring/pom.xml
deleted file mode 100644
index a47de64..0000000
--- a/components/camel-test/camel-testcontainers-spring/pom.xml
+++ /dev/null
@@ -1,146 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache.camel</groupId>
-        <artifactId>camel-test-parent</artifactId>
-        <version>3.16.0-SNAPSHOT</version>
-    </parent>
-
-    <artifactId>camel-testcontainers-spring</artifactId>
-    <packaging>jar</packaging>
-
-    <name>Camel :: Testcontainers :: Spring (deprecated)</name>
-    <description>Camel unit testing with Spring and 
testcontainers</description>
-
-    <properties>
-        <firstVersion>2.22.0</firstVersion>
-        <label>testing,java,docker</label>
-    </properties>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test-spring</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>camel-testcontainers</artifactId>
-        </dependency>
-        <!-- optional dependencies for running tests -->
-        <dependency>
-            <groupId>org.assertj</groupId>
-            <artifactId>assertj-core</artifactId>
-            <version>${assertj-version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.logging.log4j</groupId>
-            <artifactId>log4j-slf4j-impl</artifactId>
-            <scope>test</scope>
-        </dependency>
-
-    </dependencies>
-
-    <profiles>
-        <profile>
-            <id>testcontainers-spring-skip-tests</id>
-            <activation>
-                <activeByDefault>true</activeByDefault>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <artifactId>maven-surefire-plugin</artifactId>
-                        <configuration>
-                            <skipTests>true</skipTests>
-                        </configuration>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-        <!-- activate integration test if the docker socket file is accessible 
-->
-        <profile>
-            <id>testcontainers-spring-integration-tests-docker-file</id>
-            <activation>
-                <file>
-                    <exists>/var/run/docker.sock</exists>
-                </file>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-failsafe-plugin</artifactId>
-                        <configuration>
-                            <skipTests>${skipTests}</skipTests>
-                            <systemPropertyVariables>
-                                
<visibleassertions.silence>true</visibleassertions.silence>
-                            </systemPropertyVariables>
-                        </configuration>
-                        <executions>
-                            <execution>
-                                <goals>
-                                    <goal>integration-test</goal>
-                                    <goal>verify</goal>
-                                </goals>
-                            </execution>
-                        </executions>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-
-        <!-- activate integration test if the DOCKER_HOST env var is set -->
-        <profile>
-            <id>testcontainers-spring-integration-tests-docker-env</id>
-            <activation>
-                <property>
-                    <name>env.DOCKER_HOST</name>
-                </property>
-            </activation>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.apache.maven.plugins</groupId>
-                        <artifactId>maven-failsafe-plugin</artifactId>
-                        <configuration>
-                            <skipTests>${skipTests}</skipTests>
-                            <systemPropertyVariables>
-                                
<visibleassertions.silence>true</visibleassertions.silence>
-                            </systemPropertyVariables>
-                        </configuration>
-                        <executions>
-                            <execution>
-                                <goals>
-                                    <goal>integration-test</goal>
-                                    <goal>verify</goal>
-                                </goals>
-                            </execution>
-                        </executions>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-
-    </profiles>
-</project>
diff --git 
a/components/camel-test/camel-testcontainers-spring/src/generated/resources/META-INF/services/org/apache/camel/other.properties
 
b/components/camel-test/camel-testcontainers-spring/src/generated/resources/META-INF/services/org/apache/camel/other.properties
deleted file mode 100644
index c6be835..0000000
--- 
a/components/camel-test/camel-testcontainers-spring/src/generated/resources/META-INF/services/org/apache/camel/other.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-# Generated by camel build tools - do NOT edit this file!
-name=testcontainers-spring
-groupId=org.apache.camel
-artifactId=camel-testcontainers-spring
-version=3.16.0-SNAPSHOT
-projectName=Camel :: Testcontainers :: Spring (deprecated)
-projectDescription=Camel unit testing with Spring and testcontainers
diff --git 
a/components/camel-test/camel-testcontainers-spring/src/generated/resources/testcontainers-spring.json
 
b/components/camel-test/camel-testcontainers-spring/src/generated/resources/testcontainers-spring.json
deleted file mode 100644
index 5c306fc..0000000
--- 
a/components/camel-test/camel-testcontainers-spring/src/generated/resources/testcontainers-spring.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-  "other": {
-    "kind": "other",
-    "name": "testcontainers-spring",
-    "title": "Testcontainers Spring",
-    "description": "Camel unit testing with Spring and testcontainers",
-    "deprecated": true,
-    "firstVersion": "2.22.0",
-    "label": "testing,java,docker",
-    "supportLevel": "Stable",
-    "groupId": "org.apache.camel",
-    "artifactId": "camel-testcontainers-spring",
-    "version": "3.16.0-SNAPSHOT"
-  }
-}
diff --git 
a/components/camel-test/camel-testcontainers-spring/src/main/docs/testcontainers-spring.adoc
 
b/components/camel-test/camel-testcontainers-spring/src/main/docs/testcontainers-spring.adoc
deleted file mode 100644
index 9988356..0000000
--- 
a/components/camel-test/camel-testcontainers-spring/src/main/docs/testcontainers-spring.adoc
+++ /dev/null
@@ -1,15 +0,0 @@
-= Testcontainers Spring Component (deprecated)
-:doctitle: Testcontainers Spring
-:shortname: testcontainers-spring
-:artifactid: camel-testcontainers-spring
-:description: Camel unit testing with Spring and testcontainers
-:since: 2.22
-:supportlevel: Stable-deprecated
-:deprecated: *deprecated*
-
-*Since Camel {since}*
-
-Testing camel components is sometime complex because the 3rd party system a 
component interacts with does not provide testing facilities and/or is only 
available as a native application. To reduce this complexity, *Camel 
Testcontainers Spring* extends camel spring test support providing a way to 
create and interact with containerized applications.
-
-This module is an extension to the camel-testcontainers component to add 
support for Spring.
-Therefore see the documentation for testcontainers for more details.
diff --git 
a/components/camel-test/camel-testcontainers-spring/src/main/java/org/apache/camel/test/testcontainers/spring/ContainerAwareSpringTestSupport.java
 
b/components/camel-test/camel-testcontainers-spring/src/main/java/org/apache/camel/test/testcontainers/spring/ContainerAwareSpringTestSupport.java
deleted file mode 100644
index 587078c..0000000
--- 
a/components/camel-test/camel-testcontainers-spring/src/main/java/org/apache/camel/test/testcontainers/spring/ContainerAwareSpringTestSupport.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.test.testcontainers.spring;
-
-import java.util.Collections;
-import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.spi.PropertiesComponent;
-import org.apache.camel.test.spring.CamelSpringTestSupport;
-import org.apache.camel.test.testcontainers.ContainerPropertiesFunction;
-import org.apache.camel.test.testcontainers.Containers;
-import org.testcontainers.containers.GenericContainer;
-import org.testcontainers.containers.Network;
-
-/**
- * Tests using this component should switch the test-infra. Please check the 
test-infra module for details and
- * conversion procedures.
- */
-@Deprecated
-public abstract class ContainerAwareSpringTestSupport extends 
CamelSpringTestSupport {
-    private List<GenericContainer<?>> containers = new 
CopyOnWriteArrayList<>();
-
-    // ******************
-    // Setup
-    // ******************
-
-    @Override
-    protected void setupResources() throws Exception {
-        super.setupResources();
-
-        containers.clear();
-        containers.addAll(createContainers());
-
-        final Network network = containerNetwork();
-        final long timeout = containersStartupTimeout();
-
-        Containers.start(containers, network, timeout);
-    }
-
-    @Override
-    protected void cleanupResources() throws Exception {
-        super.cleanupResources();
-
-        Containers.stop(containers, containerShutdownTimeout());
-    }
-
-    @Override
-    protected CamelContext createCamelContext() throws Exception {
-        final CamelContext context = super.createCamelContext();
-        final PropertiesComponent pc = context.getPropertiesComponent();
-
-        pc.addPropertiesFunction(new ContainerPropertiesFunction(containers));
-
-        return context;
-    }
-
-    // ******************
-    // Containers set-up
-    // ******************
-
-    protected GenericContainer<?> createContainer() {
-        return null;
-    }
-
-    protected List<GenericContainer<?>> createContainers() {
-        GenericContainer<?> container = createContainer();
-
-        return container == null
-                ? Collections.emptyList()
-                : Collections.singletonList(container);
-    }
-
-    protected long containersStartupTimeout() {
-        return TimeUnit.MINUTES.toSeconds(1);
-    }
-
-    protected long containerShutdownTimeout() {
-        return TimeUnit.MINUTES.toSeconds(1);
-    }
-
-    protected Network containerNetwork() {
-        return null;
-    }
-
-    // ******************
-    // Helpers
-    // ******************
-
-    protected GenericContainer<?> getContainer(String containerName) {
-        return Containers.lookup(containers, containerName);
-    }
-
-    protected String getContainerHost(String containerName) {
-        return getContainer(containerName).getContainerIpAddress();
-    }
-
-    protected int getContainerPort(String containerName, int originalPort) {
-        return getContainer(containerName).getMappedPort(originalPort);
-    }
-}
diff --git 
a/components/camel-test/camel-testcontainers-spring/src/test/java/org/apache/camel/test/testcontainers/spring/ContainerAwareSpringTestSupportIT.java
 
b/components/camel-test/camel-testcontainers-spring/src/test/java/org/apache/camel/test/testcontainers/spring/ContainerAwareSpringTestSupportIT.java
deleted file mode 100644
index ebe0265..0000000
--- 
a/components/camel-test/camel-testcontainers-spring/src/test/java/org/apache/camel/test/testcontainers/spring/ContainerAwareSpringTestSupportIT.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.test.testcontainers.spring;
-
-import org.apache.camel.test.testcontainers.Wait;
-import org.assertj.core.api.Assertions;
-import org.junit.Test;
-import org.springframework.context.support.AbstractApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-import org.testcontainers.containers.GenericContainer;
-
-@SuppressWarnings("deprecation")
-public class ContainerAwareSpringTestSupportIT extends 
ContainerAwareSpringTestSupport {
-    @Override
-    protected AbstractApplicationContext createApplicationContext() {
-        return new ClassPathXmlApplicationContext(
-                
"org/apache/camel/test/testcontainers/spring/ContainerAwareSpringTestSupportTest.xml");
-    }
-
-    @Test
-    public void testPropertyPlaceholders() throws Exception {
-        final GenericContainer<?> container = getContainer("myconsul");
-
-        final String host = 
context.resolvePropertyPlaceholders("{{container:host:myconsul}}");
-        
Assertions.assertThat(host).isEqualTo(container.getContainerIpAddress());
-
-        final String port = 
context.resolvePropertyPlaceholders("{{container:port:8500@myconsul}}");
-        Assertions.assertThat(port).isEqualTo("" + 
container.getMappedPort(8500));
-    }
-
-    @Override
-    protected GenericContainer<?> createContainer() {
-        return new GenericContainer("consul:1.6.2")
-                .withNetworkAliases("myconsul")
-                .withExposedPorts(8500)
-                .waitingFor(Wait.forLogMessageContaining("Synced node info", 
1))
-                .withCommand(
-                        "agent",
-                        "-dev",
-                        "-server",
-                        "-bootstrap",
-                        "-client",
-                        "0.0.0.0",
-                        "-log-level",
-                        "trace");
-    }
-
-}
diff --git 
a/components/camel-test/camel-testcontainers-spring/src/test/resources/log4j2.properties
 
b/components/camel-test/camel-testcontainers-spring/src/test/resources/log4j2.properties
deleted file mode 100644
index 6d3bc2f..0000000
--- 
a/components/camel-test/camel-testcontainers-spring/src/test/resources/log4j2.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-##      http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-
-appender.file.type = File
-appender.file.name = file
-appender.file.fileName = target/camel-testcontainers-spring.log
-appender.file.layout.type = PatternLayout
-appender.file.layout.pattern = %d %-5p %c{1} - %m %n
-appender.out.type = Console
-appender.out.name = out
-appender.out.layout.type = PatternLayout
-appender.out.layout.pattern = [%30.30t] %-30.30c{1} %-5p %m%n
-logger.spring.name = org.apache.camel.test.testcontainers.spring
-logger.spring.level = DEBUG
-rootLogger.level = INFO
-rootLogger.appenderRef.file.ref = file
diff --git 
a/components/camel-test/camel-testcontainers-spring/src/test/resources/org/apache/camel/test/testcontainers/spring/ContainerAwareSpringTestSupportTest.xml
 
b/components/camel-test/camel-testcontainers-spring/src/test/resources/org/apache/camel/test/testcontainers/spring/ContainerAwareSpringTestSupportTest.xml
deleted file mode 100644
index 746954c..0000000
--- 
a/components/camel-test/camel-testcontainers-spring/src/test/resources/org/apache/camel/test/testcontainers/spring/ContainerAwareSpringTestSupportTest.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans";
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-       xmlns:camel="http://camel.apache.org/schema/spring";
-       xsi:schemaLocation="
-               http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd
-               http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd ">
-
-  <camelContext id="camelContext" 
xmlns="http://camel.apache.org/schema/spring";>
-    <route>
-      <from uri="direct:start"/>
-      <to uri="mock:result"/>
-    </route>
-  </camelContext>
-</beans>
\ No newline at end of file
diff --git a/components/camel-test/pom.xml b/components/camel-test/pom.xml
index 50fb6d6..d5ca121 100644
--- a/components/camel-test/pom.xml
+++ b/components/camel-test/pom.xml
@@ -39,7 +39,6 @@
         <module>camel-test-junit5</module>
         <module>camel-test-spring-junit5</module>
         <module>camel-testcontainers</module>
-        <module>camel-testcontainers-spring</module>
         <module>camel-testcontainers-junit5</module>
     </modules>
 
diff --git 
a/docs/components/modules/others/examples/json/testcontainers-spring.json 
b/docs/components/modules/others/examples/json/testcontainers-spring.json
deleted file mode 120000
index 0024855..0000000
--- a/docs/components/modules/others/examples/json/testcontainers-spring.json
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../components/camel-test/camel-testcontainers-spring/src/generated/resources/testcontainers-spring.json
\ No newline at end of file
diff --git a/docs/components/modules/others/nav.adoc 
b/docs/components/modules/others/nav.adoc
index d3ba9c8..df1b25e 100644
--- a/docs/components/modules/others/nav.adoc
+++ b/docs/components/modules/others/nav.adoc
@@ -62,7 +62,6 @@
 ** xref:test-spring-junit5.adoc[Test Spring JUnit5]
 ** xref:testcontainers.adoc[Testcontainers]
 ** xref:testcontainers-junit5.adoc[Testcontainers JUnit5]
-** xref:testcontainers-spring.adoc[Testcontainers Spring]
 ** xref:threadpoolfactory-vertx.adoc[ThreadPoolFactory Vert.x]
 ** xref:tracing.adoc[Tracing]
 ** xref:undertow-spring-security.adoc[Undertow Spring Security]
diff --git a/docs/components/modules/others/pages/testcontainers-spring.adoc 
b/docs/components/modules/others/pages/testcontainers-spring.adoc
deleted file mode 120000
index c0bf900..0000000
--- a/docs/components/modules/others/pages/testcontainers-spring.adoc
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../components/camel-test/camel-testcontainers-spring/src/main/docs/testcontainers-spring.adoc
\ No newline at end of file

Reply via email to