You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2023/05/31 15:28:00 UTC

[camel] branch CAMEL-19290/camel-test-infra-solr created (now 2b80ee5b903)

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

nfilotto pushed a change to branch CAMEL-19290/camel-test-infra-solr
in repository https://gitbox.apache.org/repos/asf/camel.git


      at 2b80ee5b903 CAMEL-19290: camel-solr - Remove the underlying camel-test-infra

This branch includes the following new commits:

     new 2b80ee5b903 CAMEL-19290: camel-solr - Remove the underlying camel-test-infra

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[camel] 01/01: CAMEL-19290: camel-solr - Remove the underlying camel-test-infra

Posted by nf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nfilotto pushed a commit to branch CAMEL-19290/camel-test-infra-solr
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 2b80ee5b9039d6004d665a0fe2f0d9507461e7d2
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Wed May 31 17:27:32 2023 +0200

    CAMEL-19290: camel-solr - Remove the underlying camel-test-infra
---
 test-infra/camel-test-infra-solr/pom.xml           | 58 -------------
 .../src/main/resources/META-INF/MANIFEST.MF        |  0
 .../test/infra/solr/common/SolrProperties.java     | 28 -------
 .../services/SolrLocalContainerCloudService.java   | 25 ------
 .../solr/services/SolrLocalContainerService.java   | 94 ----------------------
 .../infra/solr/services/SolrRemoteService.java     | 48 -----------
 .../test/infra/solr/services/SolrService.java      | 29 -------
 .../infra/solr/services/SolrServiceFactory.java    | 36 ---------
 test-infra/pom.xml                                 |  1 -
 9 files changed, 319 deletions(-)

diff --git a/test-infra/camel-test-infra-solr/pom.xml b/test-infra/camel-test-infra-solr/pom.xml
deleted file mode 100644
index f4af42d9493..00000000000
--- a/test-infra/camel-test-infra-solr/pom.xml
+++ /dev/null
@@ -1,58 +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">
-    <parent>
-        <artifactId>camel-test-infra-parent</artifactId>
-        <groupId>org.apache.camel</groupId>
-        <relativePath>../camel-test-infra-parent/pom.xml</relativePath>
-        <version>4.0.0-SNAPSHOT</version>
-    </parent>
-    
-    <modelVersion>4.0.0</modelVersion>
-    
-    <artifactId>camel-test-infra-solr</artifactId>
-    <name>Camel :: Test Infra :: Solr</name>
-    
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test-infra-common</artifactId>
-            <version>${project.version}</version>
-            <type>test-jar</type>
-        </dependency>
-        
-        <dependency>
-            <groupId>org.testcontainers</groupId>
-            <artifactId>testcontainers</artifactId>
-            <version>${testcontainers-version}</version>
-        </dependency>
-    </dependencies>
-    
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-            </plugin>
-        </plugins>
-    </build>
-
-
-</project>
diff --git a/test-infra/camel-test-infra-solr/src/main/resources/META-INF/MANIFEST.MF b/test-infra/camel-test-infra-solr/src/main/resources/META-INF/MANIFEST.MF
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/test-infra/camel-test-infra-solr/src/test/java/org/apache/camel/test/infra/solr/common/SolrProperties.java b/test-infra/camel-test-infra-solr/src/test/java/org/apache/camel/test/infra/solr/common/SolrProperties.java
deleted file mode 100644
index dd94d388f15..00000000000
--- a/test-infra/camel-test-infra-solr/src/test/java/org/apache/camel/test/infra/solr/common/SolrProperties.java
+++ /dev/null
@@ -1,28 +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.infra.solr.common;
-
-public final class SolrProperties {
-    public static final String SERVICE_ADDRESS = "solr.service.address";
-    public static final String SOLR_CONTAINER = "solr.container";
-    public static final String SOLR_MODE = "SOLR_MODE";
-
-    private SolrProperties() {
-
-    }
-}
diff --git a/test-infra/camel-test-infra-solr/src/test/java/org/apache/camel/test/infra/solr/services/SolrLocalContainerCloudService.java b/test-infra/camel-test-infra-solr/src/test/java/org/apache/camel/test/infra/solr/services/SolrLocalContainerCloudService.java
deleted file mode 100644
index 2d9fa82f10a..00000000000
--- a/test-infra/camel-test-infra-solr/src/test/java/org/apache/camel/test/infra/solr/services/SolrLocalContainerCloudService.java
+++ /dev/null
@@ -1,25 +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.infra.solr.services;
-
-public class SolrLocalContainerCloudService extends SolrLocalContainerService {
-
-    @Override
-    public boolean isCloudMode() {
-        return true;
-    }
-}
diff --git a/test-infra/camel-test-infra-solr/src/test/java/org/apache/camel/test/infra/solr/services/SolrLocalContainerService.java b/test-infra/camel-test-infra-solr/src/test/java/org/apache/camel/test/infra/solr/services/SolrLocalContainerService.java
deleted file mode 100644
index bf60de452e2..00000000000
--- a/test-infra/camel-test-infra-solr/src/test/java/org/apache/camel/test/infra/solr/services/SolrLocalContainerService.java
+++ /dev/null
@@ -1,94 +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.infra.solr.services;
-
-import org.apache.camel.test.infra.common.services.ContainerService;
-import org.apache.camel.test.infra.solr.common.SolrProperties;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.testcontainers.containers.GenericContainer;
-import org.testcontainers.containers.output.Slf4jLogConsumer;
-import org.testcontainers.containers.wait.strategy.Wait;
-
-public class SolrLocalContainerService implements SolrService, ContainerService<GenericContainer> {
-    public static final String CONTAINER_IMAGE = "solr:8.11.2";
-    public static final String CONTAINER_NAME = "solr";
-    private static final int PORT = 8983;
-
-    private static final Logger LOG = LoggerFactory.getLogger(SolrLocalContainerService.class);
-    private final GenericContainer container;
-
-    public SolrLocalContainerService() {
-        this(System.getProperty(SolrProperties.SOLR_CONTAINER, CONTAINER_IMAGE));
-    }
-
-    public SolrLocalContainerService(String imageName) {
-        container = initContainer(imageName, CONTAINER_NAME);
-    }
-
-    protected GenericContainer initContainer(String imageName, String containerName) {
-        return new GenericContainer<>(imageName)
-                .withNetworkAliases(containerName)
-                .withExposedPorts(PORT)
-                .withLogConsumer(new Slf4jLogConsumer(LOG).withPrefix(SolrLocalContainerService.CONTAINER_IMAGE))
-                .waitingFor(Wait.forLogMessage(".*Server.*Started.*", 1))
-                .withCommand(isCloudMode() ? "-c" : "");
-    }
-
-    @Override
-    public void registerProperties() {
-        System.setProperty(SolrProperties.SERVICE_ADDRESS, getSolrBaseUrl());
-    }
-
-    @Override
-    public void initialize() {
-        LOG.info("Trying to start the {} container", CONTAINER_IMAGE);
-        container.start();
-
-        registerProperties();
-        LOG.info("{} instance running at {}", CONTAINER_IMAGE, getSolrBaseUrl());
-    }
-
-    @Override
-    public void shutdown() {
-        LOG.info("Stopping the {} container", CONTAINER_IMAGE);
-        container.stop();
-    }
-
-    @Override
-    public GenericContainer getContainer() {
-        return container;
-    }
-
-    protected String getHost() {
-        return container.getHost();
-    }
-
-    protected int getPort() {
-        return container.getMappedPort(PORT);
-    }
-
-    @Override
-    public String getSolrBaseUrl() {
-        return String.format("http://%s:%d/solr", getHost(), getPort());
-    }
-
-    @Override
-    public boolean isCloudMode() {
-        return false;
-    }
-}
diff --git a/test-infra/camel-test-infra-solr/src/test/java/org/apache/camel/test/infra/solr/services/SolrRemoteService.java b/test-infra/camel-test-infra-solr/src/test/java/org/apache/camel/test/infra/solr/services/SolrRemoteService.java
deleted file mode 100644
index bd77dbbb2bc..00000000000
--- a/test-infra/camel-test-infra-solr/src/test/java/org/apache/camel/test/infra/solr/services/SolrRemoteService.java
+++ /dev/null
@@ -1,48 +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.infra.solr.services;
-
-import org.apache.camel.test.infra.solr.common.SolrProperties;
-
-public class SolrRemoteService implements SolrService {
-
-    @Override
-    public String getSolrBaseUrl() {
-        return System.getProperty(SolrProperties.SERVICE_ADDRESS);
-    }
-
-    @Override
-    public boolean isCloudMode() {
-        return System.getProperty(SolrProperties.SOLR_MODE).equals("solrcloud");
-    }
-
-    @Override
-    public void registerProperties() {
-        // NO-OP
-    }
-
-    @Override
-    public void initialize() {
-        registerProperties();
-    }
-
-    @Override
-    public void shutdown() {
-        // NO-OP
-    }
-
-}
diff --git a/test-infra/camel-test-infra-solr/src/test/java/org/apache/camel/test/infra/solr/services/SolrService.java b/test-infra/camel-test-infra-solr/src/test/java/org/apache/camel/test/infra/solr/services/SolrService.java
deleted file mode 100644
index 44409e9f4de..00000000000
--- a/test-infra/camel-test-infra-solr/src/test/java/org/apache/camel/test/infra/solr/services/SolrService.java
+++ /dev/null
@@ -1,29 +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.infra.solr.services;
-
-import org.apache.camel.test.infra.common.services.TestService;
-
-/**
- * Test infra service for Solr
- */
-public interface SolrService extends TestService {
-
-    String getSolrBaseUrl();
-
-    boolean isCloudMode();
-}
diff --git a/test-infra/camel-test-infra-solr/src/test/java/org/apache/camel/test/infra/solr/services/SolrServiceFactory.java b/test-infra/camel-test-infra-solr/src/test/java/org/apache/camel/test/infra/solr/services/SolrServiceFactory.java
deleted file mode 100644
index 798ec0908ca..00000000000
--- a/test-infra/camel-test-infra-solr/src/test/java/org/apache/camel/test/infra/solr/services/SolrServiceFactory.java
+++ /dev/null
@@ -1,36 +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.infra.solr.services;
-
-import org.apache.camel.test.infra.common.services.SimpleTestServiceBuilder;
-
-public final class SolrServiceFactory {
-    private SolrServiceFactory() {
-
-    }
-
-    public static SimpleTestServiceBuilder<SolrService> builder() {
-        return new SimpleTestServiceBuilder<>(SolrLocalContainerService.CONTAINER_NAME);
-    }
-
-    public static SolrService createService() {
-        return builder()
-                .addLocalMapping(SolrLocalContainerService::new)
-                .addRemoteMapping(SolrRemoteService::new)
-                .build();
-    }
-}
diff --git a/test-infra/pom.xml b/test-infra/pom.xml
index ed96da6fc2b..e4f574441dc 100644
--- a/test-infra/pom.xml
+++ b/test-infra/pom.xml
@@ -60,7 +60,6 @@
         <module>camel-test-infra-nats</module>
         <module>camel-test-infra-pulsar</module>
         <module>camel-test-infra-redis</module>
-        <module>camel-test-infra-solr</module>
         <module>camel-test-infra-xmpp</module>
         <module>camel-test-infra-zookeeper</module>
         <module>camel-test-infra-postgres</module>