You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2022/02/10 15:39:06 UTC

[camel] 01/02: CAMEL-17621: remove deprecated camel-testcontainers component

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 51d91b5e974e0b5753313c8a21610fc14cc89379
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Wed Feb 9 17:49:30 2022 +0100

    CAMEL-17621: remove deprecated camel-testcontainers component
---
 .../org/apache/camel/catalog/others.properties     |   1 -
 .../camel/catalog/others/testcontainers.json       |  15 ---
 components/camel-test/camel-testcontainers/pom.xml | 147 ---------------------
 .../services/org/apache/camel/other.properties     |   7 -
 .../src/generated/resources/testcontainers.json    |  15 ---
 .../src/main/docs/testcontainers.adoc              | 123 -----------------
 .../testcontainers/ContainerAwareTestSupport.java  | 115 ----------------
 .../ContainerPropertiesFunction.java               |  80 -----------
 .../camel/test/testcontainers/Containers.java      |  90 -------------
 .../org/apache/camel/test/testcontainers/Wait.java |  77 -----------
 .../ContainerAwareTestSupportIT.java               |  53 --------
 .../src/test/resources/log4j2.properties           |  30 -----
 components/camel-test/pom.xml                      |   1 -
 .../others/examples/json/testcontainers.json       |   1 -
 docs/components/modules/others/nav.adoc            |   1 -
 .../modules/others/pages/testcontainers.adoc       |   1 -
 16 files changed, 757 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 2837b97..5f99325 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
@@ -55,7 +55,6 @@ test-cdi
 test-junit5
 test-spring
 test-spring-junit5
-testcontainers
 threadpoolfactory-vertx
 tracing
 undertow-spring-security
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/testcontainers.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/testcontainers.json
deleted file mode 100644
index 7616dcb..0000000
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/testcontainers.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-  "other": {
-    "kind": "other",
-    "name": "testcontainers",
-    "title": "Testcontainers",
-    "description": "Camel support for testcontainers",
-    "deprecated": true,
-    "firstVersion": "2.22.0",
-    "label": "testing,java,docker",
-    "supportLevel": "Stable",
-    "groupId": "org.apache.camel",
-    "artifactId": "camel-testcontainers",
-    "version": "3.16.0-SNAPSHOT"
-  }
-}
diff --git a/components/camel-test/camel-testcontainers/pom.xml b/components/camel-test/camel-testcontainers/pom.xml
deleted file mode 100644
index 8aba04d..0000000
--- a/components/camel-test/camel-testcontainers/pom.xml
+++ /dev/null
@@ -1,147 +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</artifactId>
-    <packaging>jar</packaging>
-
-    <name>Camel :: Testcontainers (deprecated)</name>
-    <description>Camel support for testcontainers</description>
-
-    <properties>
-        <firstVersion>2.22.0</firstVersion>
-        <label>testing,java,docker</label>
-
-    </properties>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.testcontainers</groupId>
-            <artifactId>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-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-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-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/src/generated/resources/META-INF/services/org/apache/camel/other.properties b/components/camel-test/camel-testcontainers/src/generated/resources/META-INF/services/org/apache/camel/other.properties
deleted file mode 100644
index 2657a04..0000000
--- a/components/camel-test/camel-testcontainers/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
-groupId=org.apache.camel
-artifactId=camel-testcontainers
-version=3.16.0-SNAPSHOT
-projectName=Camel :: Testcontainers (deprecated)
-projectDescription=Camel support for testcontainers
diff --git a/components/camel-test/camel-testcontainers/src/generated/resources/testcontainers.json b/components/camel-test/camel-testcontainers/src/generated/resources/testcontainers.json
deleted file mode 100644
index 7616dcb..0000000
--- a/components/camel-test/camel-testcontainers/src/generated/resources/testcontainers.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-  "other": {
-    "kind": "other",
-    "name": "testcontainers",
-    "title": "Testcontainers",
-    "description": "Camel support for testcontainers",
-    "deprecated": true,
-    "firstVersion": "2.22.0",
-    "label": "testing,java,docker",
-    "supportLevel": "Stable",
-    "groupId": "org.apache.camel",
-    "artifactId": "camel-testcontainers",
-    "version": "3.16.0-SNAPSHOT"
-  }
-}
diff --git a/components/camel-test/camel-testcontainers/src/main/docs/testcontainers.adoc b/components/camel-test/camel-testcontainers/src/main/docs/testcontainers.adoc
deleted file mode 100644
index 08e6c9a..0000000
--- a/components/camel-test/camel-testcontainers/src/main/docs/testcontainers.adoc
+++ /dev/null
@@ -1,123 +0,0 @@
-= Testcontainers Component (deprecated)
-:doctitle: Testcontainers
-:shortname: testcontainers
-:artifactid: camel-testcontainers
-:description: Camel support for 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* extends standard camel test support providing a way to create and interact with containerized applications.
-
-In order to define leverage testcontainers, add the following dependency to your pom:
-
-[source,xml]
-----
-<dependency>
-    <groupId>org.apache.camel</groupId>
-    <artifactId>camel-testcontainers</artifactId>
-    <version>x.x.x</version>
-    <!-- use the same version as your Camel core version -->
-    <scope>test</scope>
-</dependency>
-----
-
-[TIP]
-====
-To learn more about testcontainers, please have a look at the official documentation https://www.testcontainers.org
-====
-
-To leverage testcontainers in your tests, you can use `ContainerAwareTestSupport` which is an extension of `CamelTestSupport` which:
-
-- create/destroy containers according to camel context lifecycle
-- inject a custom `PropertiesFunction` to access container specific options from properties
-
-
-To create a container you need to override:
-[source, java]
-----
-protected GenericContainer<?> createContainer()
-----
-
-If you need to create more that one container, you can override the following method:
-[source, java]
-----
-protected List<GenericContainer<?>> createContainers()
-----
-
-The methods above are invoked before the camel context starts and blocks until the containers are reported to be alive. Containers are destroyed once the camel context stops.
-
-[source,java]
-.Example
-----
-@Override
-protected GenericContainer<?> createContainer() {
-    return new GenericContainer<>("consul:1.0.7")
-        .withNetworkAliases("myconsul") // <1>
-        .withExposedPorts(8500)
-        .waitingFor(Wait.forLogMessageContaining("Synced node info", 1)) // <2>
-        .withCommand(
-            "agent",
-            "-dev",
-            "-server",
-            "-bootstrap",
-            "-client",
-            "0.0.0.0",
-            "-log-level",
-            "trace"
-        );
-}
-----
-<1> container name/alias
-<2> container startup condition
-
-[IMPORTANT]
-====
-It is important to give a name/alias to the container so you can then use properties functions to retrieve information such as container's host and port mapping.
-====
-[TIP]
-====
-You may need to wait for some condition to be satisfied before starting your test, to do so you need to configure the test suite to wait for such event using `GenericContainer.waitingFor`. Testcontainers provide a number of ready to use waiting strategy, for more info see the official testcontainers documentation.
-====
-
-Camel Testcontainer provides a PropertiesFunction implementation that can be used to:
-
-- retrieve the container host with the following syntax `container:host:$\{container-name}`
-- retrieve the port mapping with the following syntax `container:port:$\{exposed-port}@$\{container-name}`
-
-[source,java]
-.Example
-----
-public class MyTest extends ContainerAwareTestSupport {
-    @Test
-    public void testPropertyPlaceholders() throws Exception {
-        GenericContainer<?> container = getContainer("myconsul");
-
-        String host = context.resolvePropertyPlaceholders("{{container:host:myconsul}}");
-        assertThat(host).isEqualTo(container.getContainerIpAddress());
-
-        String port = context.resolvePropertyPlaceholders("{{container:port:8500@myconsul}}");
-        assertThat(port).isEqualTo("" + container.getMappedPort(8500));
-    }
-
-    @Override
-    protected GenericContainer<?> createContainer() {
-        return new GenericContainer<>("consul:1.0.7")
-            .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/src/main/java/org/apache/camel/test/testcontainers/ContainerAwareTestSupport.java b/components/camel-test/camel-testcontainers/src/main/java/org/apache/camel/test/testcontainers/ContainerAwareTestSupport.java
deleted file mode 100644
index a433821..0000000
--- a/components/camel-test/camel-testcontainers/src/main/java/org/apache/camel/test/testcontainers/ContainerAwareTestSupport.java
+++ /dev/null
@@ -1,115 +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;
-
-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.junit4.CamelTestSupport;
-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 class ContainerAwareTestSupport extends CamelTestSupport {
-    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/src/main/java/org/apache/camel/test/testcontainers/ContainerPropertiesFunction.java b/components/camel-test/camel-testcontainers/src/main/java/org/apache/camel/test/testcontainers/ContainerPropertiesFunction.java
deleted file mode 100644
index ced1c4e..0000000
--- a/components/camel-test/camel-testcontainers/src/main/java/org/apache/camel/test/testcontainers/ContainerPropertiesFunction.java
+++ /dev/null
@@ -1,80 +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;
-
-import java.util.List;
-
-import org.apache.camel.spi.PropertiesFunction;
-import org.apache.camel.util.ObjectHelper;
-import org.apache.camel.util.StringHelper;
-import org.testcontainers.containers.GenericContainer;
-
-/**
- * Tests using this component should switch the test-infra. Please check the test-infra module for details and
- * conversion procedures.
- */
-@Deprecated
-public class ContainerPropertiesFunction implements PropertiesFunction {
-    private final List<GenericContainer<?>> containers;
-
-    public ContainerPropertiesFunction(List<GenericContainer<?>> containers) {
-        this.containers = ObjectHelper.notNull(containers, "Containers");
-    }
-
-    @Override
-    public String getName() {
-        return "container";
-    }
-
-    @Override
-    public String apply(String remainder) {
-        final String type = StringHelper.before(remainder, ":");
-        final String query = StringHelper.after(remainder, ":");
-
-        if (ObjectHelper.isEmpty(type)) {
-            throw new IllegalArgumentException("container function syntax is container:type:query");
-        }
-
-        if ("host".equalsIgnoreCase(type)) {
-            String name = StringHelper.after(remainder, ":");
-
-            if (ObjectHelper.isEmpty(name)) {
-                throw new IllegalArgumentException("unable to determine container name");
-            }
-
-            return Containers.lookup(containers, StringHelper.after(remainder, ":")).getContainerIpAddress();
-        }
-
-        if ("port".equalsIgnoreCase(type)) {
-            String port = StringHelper.before(query, "@");
-            String name = StringHelper.after(query, "@");
-
-            if (ObjectHelper.isEmpty(port)) {
-                throw new IllegalArgumentException("unable to determine original port");
-            }
-
-            if (ObjectHelper.isEmpty(name)) {
-                throw new IllegalArgumentException("unable to determine container name");
-            }
-
-            return Integer.toString(
-                    Containers.lookup(containers, name).getMappedPort(Integer.parseInt(port)));
-        }
-
-        throw new IllegalArgumentException("Unsupported type: " + type);
-    }
-}
diff --git a/components/camel-test/camel-testcontainers/src/main/java/org/apache/camel/test/testcontainers/Containers.java b/components/camel-test/camel-testcontainers/src/main/java/org/apache/camel/test/testcontainers/Containers.java
deleted file mode 100644
index 032092f..0000000
--- a/components/camel-test/camel-testcontainers/src/main/java/org/apache/camel/test/testcontainers/Containers.java
+++ /dev/null
@@ -1,90 +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;
-
-import java.util.List;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.camel.util.ObjectHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testcontainers.containers.GenericContainer;
-import org.testcontainers.containers.Network;
-import org.testcontainers.containers.output.Slf4jLogConsumer;
-
-import static java.util.stream.Collectors.joining;
-
-/**
- * Tests using this component should switch the test-infra. Please check the test-infra module for details and
- * conversion procedures.
- */
-@Deprecated
-public final class Containers {
-    private static final Logger LOGGER = LoggerFactory.getLogger(Containers.class);
-
-    private Containers() {
-    }
-
-    public static void start(List<GenericContainer<?>> containers, Network network, long timeout) throws Exception {
-        final CountDownLatch latch = new CountDownLatch(containers.size());
-
-        for (GenericContainer<?> container : containers) {
-            if (ObjectHelper.isEmpty(container.getNetworkAliases())) {
-                throw new IllegalStateException("Container should have at least a network alias");
-            }
-
-            if (network != null) {
-                container.withNetwork(network);
-            }
-
-            // Add custom logger
-            container.withLogConsumer(
-                    new Slf4jLogConsumer(LOGGER).withPrefix(container.getNetworkAliases().stream().collect(joining(","))));
-
-            new Thread(() -> {
-                container.start();
-                latch.countDown();
-            }).start();
-        }
-
-        latch.await(timeout, TimeUnit.SECONDS);
-    }
-
-    public static void stop(List<GenericContainer<?>> containers, long timeout) throws Exception {
-        final CountDownLatch latch = new CountDownLatch(containers.size());
-
-        for (GenericContainer<?> container : containers) {
-            new Thread(() -> {
-                container.stop();
-                latch.countDown();
-            }).start();
-        }
-
-        latch.await(timeout, TimeUnit.SECONDS);
-    }
-
-    public static GenericContainer<?> lookup(List<GenericContainer<?>> containers, String containerName) {
-        for (GenericContainer<?> container : containers) {
-            if (container.getNetworkAliases().contains(containerName)) {
-                return container;
-            }
-        }
-
-        throw new IllegalArgumentException("No container with name " + containerName + " found");
-    }
-}
diff --git a/components/camel-test/camel-testcontainers/src/main/java/org/apache/camel/test/testcontainers/Wait.java b/components/camel-test/camel-testcontainers/src/main/java/org/apache/camel/test/testcontainers/Wait.java
deleted file mode 100644
index 49b4245..0000000
--- a/components/camel-test/camel-testcontainers/src/main/java/org/apache/camel/test/testcontainers/Wait.java
+++ /dev/null
@@ -1,77 +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;
-
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-import java.util.function.Predicate;
-
-import com.github.dockerjava.api.DockerClient;
-import org.testcontainers.DockerClientFactory;
-import org.testcontainers.containers.ContainerLaunchException;
-import org.testcontainers.containers.output.OutputFrame;
-import org.testcontainers.containers.output.WaitingConsumer;
-import org.testcontainers.containers.wait.strategy.AbstractWaitStrategy;
-import org.testcontainers.containers.wait.strategy.WaitStrategy;
-import org.testcontainers.utility.LogUtils;
-
-/**
- * Tests using this component should switch the test-infra. Please check the test-infra module for details and
- * conversion procedures.
- */
-@Deprecated
-public class Wait extends org.testcontainers.containers.wait.strategy.Wait {
-    /**
-     * Convenience method to return a WaitStrategy for log messages using a predicate.
-     *
-     * @param  predicate the predicate to apply to log messages
-     * @param  times     the number of times the pattern is expected
-     * @return           WaitStrategy
-     */
-    public static WaitStrategy forLogPredicate(Predicate<OutputFrame> predicate, int times) {
-        return new AbstractWaitStrategy() {
-            @Override
-            protected void waitUntilReady() {
-                final DockerClient client = DockerClientFactory.instance().client();
-                final WaitingConsumer waitingConsumer = new WaitingConsumer();
-
-                LogUtils.followOutput(client, waitStrategyTarget.getContainerId(), waitingConsumer);
-
-                try {
-                    waitingConsumer.waitUntil(
-                            predicate,
-                            startupTimeout.getSeconds(),
-                            TimeUnit.SECONDS,
-                            times);
-                } catch (TimeoutException e) {
-                    throw new ContainerLaunchException("Timed out");
-                }
-            }
-        };
-    }
-
-    /**
-     * Convenience method to return a WaitStrategy for log messages.
-     *
-     * @param  text  the text to find
-     * @param  times the number of times the pattern is expected
-     * @return       WaitStrategy
-     */
-    public static WaitStrategy forLogMessageContaining(String text, int times) {
-        return forLogPredicate(u -> u.getUtf8String().contains(text), times);
-    }
-}
diff --git a/components/camel-test/camel-testcontainers/src/test/java/org/apache/camel/test/testcontainers/ContainerAwareTestSupportIT.java b/components/camel-test/camel-testcontainers/src/test/java/org/apache/camel/test/testcontainers/ContainerAwareTestSupportIT.java
deleted file mode 100644
index 230d840..0000000
--- a/components/camel-test/camel-testcontainers/src/test/java/org/apache/camel/test/testcontainers/ContainerAwareTestSupportIT.java
+++ /dev/null
@@ -1,53 +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;
-
-import org.assertj.core.api.Assertions;
-import org.junit.Test;
-import org.testcontainers.containers.GenericContainer;
-
-@SuppressWarnings("deprecation")
-public class ContainerAwareTestSupportIT extends ContainerAwareTestSupport {
-    @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/src/test/resources/log4j2.properties b/components/camel-test/camel-testcontainers/src/test/resources/log4j2.properties
deleted file mode 100644
index 7db2ad4..0000000
--- a/components/camel-test/camel-testcontainers/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.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
-logger.spring.level = DEBUG
-rootLogger.level = INFO
-rootLogger.appenderRef.file.ref = file
diff --git a/components/camel-test/pom.xml b/components/camel-test/pom.xml
index a21be85..265f733 100644
--- a/components/camel-test/pom.xml
+++ b/components/camel-test/pom.xml
@@ -38,7 +38,6 @@
         <module>camel-test-spring</module>
         <module>camel-test-junit5</module>
         <module>camel-test-spring-junit5</module>
-        <module>camel-testcontainers</module>
     </modules>
 
 </project>
diff --git a/docs/components/modules/others/examples/json/testcontainers.json b/docs/components/modules/others/examples/json/testcontainers.json
deleted file mode 120000
index 8504a31..0000000
--- a/docs/components/modules/others/examples/json/testcontainers.json
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../components/camel-test/camel-testcontainers/src/generated/resources/testcontainers.json
\ No newline at end of file
diff --git a/docs/components/modules/others/nav.adoc b/docs/components/modules/others/nav.adoc
index 4a5baf6..b930993 100644
--- a/docs/components/modules/others/nav.adoc
+++ b/docs/components/modules/others/nav.adoc
@@ -60,7 +60,6 @@
 ** xref:test-junit5.adoc[Test JUnit5]
 ** xref:test-spring.adoc[Test Spring]
 ** xref:test-spring-junit5.adoc[Test Spring JUnit5]
-** xref:testcontainers.adoc[Testcontainers]
 ** 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.adoc b/docs/components/modules/others/pages/testcontainers.adoc
deleted file mode 120000
index 1792d9a..0000000
--- a/docs/components/modules/others/pages/testcontainers.adoc
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../components/camel-test/camel-testcontainers/src/main/docs/testcontainers.adoc
\ No newline at end of file