You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2022/06/13 16:00:17 UTC

[camel-spring-boot] branch main updated: Remove itest that gets out of date and hard to maintain

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

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git


The following commit(s) were added to refs/heads/main by this push:
     new 4e8f60aa8a3 Remove itest that gets out of date and hard to maintain
4e8f60aa8a3 is described below

commit 4e8f60aa8a3d2d34d94f4ace3d6fcc76f108a7d9
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Jun 13 18:00:06 2022 +0200

    Remove itest that gets out of date and hard to maintain
---
 .../infinispan/pom.xml                             |  55 --------
 .../springboot/infinispan/InfinispanRoutes.java    |  49 -------
 .../springboot/infinispan/InfinispanTest.java      | 153 ---------------------
 .../integration-common/pom.xml                     |  32 -----
 .../camel/integration/springboot/Application.java  |  28 ----
 .../springboot/SpringBootBaseIntegration.java      |  36 -----
 tests/camel-spring-boot-integration-tests/pom.xml  |  68 ---------
 tests/pom.xml                                      |   1 -
 8 files changed, 422 deletions(-)

diff --git a/tests/camel-spring-boot-integration-tests/infinispan/pom.xml b/tests/camel-spring-boot-integration-tests/infinispan/pom.xml
deleted file mode 100644
index 0c1dcd40913..00000000000
--- a/tests/camel-spring-boot-integration-tests/infinispan/pom.xml
+++ /dev/null
@@ -1,55 +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-spring-boot-integration-tests</artifactId>
-		<groupId>org.apache.camel.springboot</groupId>
-		<version>3.18.0-SNAPSHOT</version>
-	</parent>
-	<modelVersion>4.0.0</modelVersion>
-
-	<artifactId>infinispan</artifactId>
-	<name>Camel SB :: Integration Tests :: Infinispan</name>
-
-	<dependencies>
-		<dependency>
-			<groupId>org.apache.camel.springboot</groupId>
-			<artifactId>integration-common</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-
-		<dependency>
-			<groupId>org.apache.camel.springboot</groupId>
-			<artifactId>camel-infinispan-starter</artifactId>
-			<version>${project.version}</version>
-		</dependency>
-
-		<dependency>
-			<groupId>org.apache.camel</groupId>
-			<artifactId>camel-test-infra-infinispan</artifactId>
-			<version>${camel-version}</version>
-			<type>test-jar</type>
-			<scope>test</scope>
-		</dependency>
-	</dependencies>
-
-</project>
diff --git a/tests/camel-spring-boot-integration-tests/infinispan/src/main/java/org/apache/camel/integration/springboot/infinispan/InfinispanRoutes.java b/tests/camel-spring-boot-integration-tests/infinispan/src/main/java/org/apache/camel/integration/springboot/infinispan/InfinispanRoutes.java
deleted file mode 100644
index 4c72f3c01cf..00000000000
--- a/tests/camel-spring-boot-integration-tests/infinispan/src/main/java/org/apache/camel/integration/springboot/infinispan/InfinispanRoutes.java
+++ /dev/null
@@ -1,49 +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.integration.springboot.infinispan;
-
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.infinispan.InfinispanConstants;
-import org.apache.camel.component.infinispan.InfinispanOperation;
-
-import org.springframework.stereotype.Component;
-
-@Component
-public class InfinispanRoutes extends RouteBuilder {
-
-	@Override
-	public void configure() throws Exception {
-		from("direct:put")
-			.setHeader(InfinispanConstants.OPERATION)
-				.constant(InfinispanOperation.PUT)
-		.to("infinispanRemoteComponent://myCache");
-
-		from("direct:get")
-			.setHeader(InfinispanConstants.OPERATION)
-				.constant(InfinispanOperation.GET)
-		.to("infinispanRemoteComponent://myCache")
-		.to("mock:result");
-
-		from("direct:consumer")
-			.setHeader(InfinispanConstants.OPERATION)
-				.constant(InfinispanOperation.PUT)
-		.to("infinispanRemoteComponent://myConsumerCache");
-
-		from("infinispanRemoteComponent://myConsumerCache")
-		.to("mock:consumerResult");
-	}
-}
diff --git a/tests/camel-spring-boot-integration-tests/infinispan/src/test/java/org/apache/camel/integration/springboot/infinispan/InfinispanTest.java b/tests/camel-spring-boot-integration-tests/infinispan/src/test/java/org/apache/camel/integration/springboot/infinispan/InfinispanTest.java
deleted file mode 100644
index f3706b1c480..00000000000
--- a/tests/camel-spring-boot-integration-tests/infinispan/src/test/java/org/apache/camel/integration/springboot/infinispan/InfinispanTest.java
+++ /dev/null
@@ -1,153 +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.integration.springboot.infinispan;
-
-import org.apache.camel.Exchange;
-import org.apache.camel.component.infinispan.InfinispanConstants;
-import org.apache.camel.component.infinispan.remote.InfinispanRemoteComponent;
-import org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.integration.springboot.Application;
-import org.apache.camel.integration.springboot.SpringBootBaseIntegration;
-import org.apache.camel.test.infra.infinispan.services.InfinispanService;
-import org.apache.camel.test.infra.infinispan.services.InfinispanServiceFactory;
-
-import org.junit.jupiter.api.Test;
-import org.junit.jupiter.api.extension.RegisterExtension;
-
-import org.infinispan.client.hotrod.RemoteCacheManager;
-import org.infinispan.client.hotrod.configuration.ConfigurationBuilder;
-import org.infinispan.configuration.cache.CacheMode;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.testcontainers.shaded.org.apache.commons.lang3.SystemUtils;
-
-import java.util.Properties;
-import java.util.Random;
-import java.util.UUID;
-
-@SpringBootTest(classes = { Application.class, InfinispanTest.InfinispanConfiguration.class })
-public class InfinispanTest extends SpringBootBaseIntegration {
-
-	@RegisterExtension
-	public static InfinispanService service = InfinispanServiceFactory.createService();
-
-	@Test
-	public void producer() throws InterruptedException {
-		final String msg = UUID.randomUUID().toString();
-		final Integer key = new Random().nextInt();
-
-		final MockEndpoint mock = camelContext.getEndpoint("mock:result", MockEndpoint.class);
-		mock.expectedMessageCount(1);
-		mock.expectedBodiesReceived(msg);
-
-		sendMessage("direct:put", key, msg);
-
-		sendMessage("direct:get", key, msg);
-
-		mock.assertIsSatisfied();
-	}
-
-	@Test
-	public void consumer() throws InterruptedException {
-		final String msg = UUID.randomUUID().toString();
-		final Integer key = new Random().nextInt();
-
-		MockEndpoint mock = camelContext.getEndpoint("mock:consumerResult", MockEndpoint.class);
-		mock.expectedMessageCount(1);
-		mock.expectedHeaderReceived("CamelInfinispanKey", key);
-
-		sendMessage("direct:consumer", key, msg);
-
-		mock.assertIsSatisfied();
-	}
-
-	private Exchange sendMessage(String endpointUri, Integer key, String msg) {
-		return producerTemplate.send(endpointUri, exchange -> {
-			exchange.getIn().setHeader(InfinispanConstants.KEY, key);
-			exchange.getIn().setHeader(InfinispanConstants.VALUE, msg);
-		});
-	}
-
-	@Configuration
-	public static class InfinispanConfiguration {
-
-		protected static ConfigurationBuilder getConfiguration() {
-			ConfigurationBuilder clientBuilder = new ConfigurationBuilder();
-
-			// for default tests, we force return value for all the
-			// operations
-			clientBuilder
-					.forceReturnValues(true);
-
-			// add server from the test infra service
-			clientBuilder
-					.addServer()
-					.host(service.host())
-					.port(service.port());
-
-			// add security info
-			clientBuilder
-					.security()
-					.authentication()
-					.username(service.username())
-					.password(service.password())
-					.serverName("infinispan")
-					.saslMechanism("DIGEST-MD5")
-					.realm("default");
-			if (SystemUtils.IS_OS_MAC) {
-		            Properties properties = new Properties();
-		            properties.put("infinispan.client.hotrod.client_intelligence", "BASIC");
-		            clientBuilder.withProperties(properties);
-			}
-
-			return clientBuilder;
-		}
-
-		@Bean("infinispanRemoteComponent")
-		public InfinispanRemoteComponent infinispanRemoteComponent() {
-			InfinispanRemoteConfiguration infinispanRemoteConfiguration = new InfinispanRemoteConfiguration();
-
-			infinispanRemoteConfiguration.setHosts(service.host() + ":" + service.port());
-
-			infinispanRemoteConfiguration.setUsername(service.username());
-			infinispanRemoteConfiguration.setPassword(service.password());
-
-			RemoteCacheManager cacheContainer = new RemoteCacheManager(getConfiguration().build());
-			cacheContainer.administration()
-					.getOrCreateCache(
-							"myCache",
-							new org.infinispan.configuration.cache.ConfigurationBuilder()
-									.clustering()
-									.cacheMode(CacheMode.DIST_SYNC).build());
-
-			cacheContainer.administration()
-					.getOrCreateCache(
-							"myConsumerCache",
-							new org.infinispan.configuration.cache.ConfigurationBuilder()
-									.clustering()
-									.cacheMode(CacheMode.DIST_SYNC).build());
-
-			infinispanRemoteConfiguration.setCacheContainer(cacheContainer);
-			InfinispanRemoteComponent component = new InfinispanRemoteComponent();
-			component.setConfiguration(infinispanRemoteConfiguration);
-
-			return component;
-		}
-	}
-}
diff --git a/tests/camel-spring-boot-integration-tests/integration-common/pom.xml b/tests/camel-spring-boot-integration-tests/integration-common/pom.xml
deleted file mode 100644
index 5e1c91f6470..00000000000
--- a/tests/camel-spring-boot-integration-tests/integration-common/pom.xml
+++ /dev/null
@@ -1,32 +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-spring-boot-integration-tests</artifactId>
-		<groupId>org.apache.camel.springboot</groupId>
-		<version>3.18.0-SNAPSHOT</version>
-	</parent>
-	<modelVersion>4.0.0</modelVersion>
-
-	<artifactId>integration-common</artifactId>
-	<name>Camel SB :: Integration Tests :: Common</name>
-</project>
diff --git a/tests/camel-spring-boot-integration-tests/integration-common/src/main/java/org/apache/camel/integration/springboot/Application.java b/tests/camel-spring-boot-integration-tests/integration-common/src/main/java/org/apache/camel/integration/springboot/Application.java
deleted file mode 100644
index 3c05c126a9b..00000000000
--- a/tests/camel-spring-boot-integration-tests/integration-common/src/main/java/org/apache/camel/integration/springboot/Application.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.integration.springboot;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-@SpringBootApplication
-public class Application {
-
-	public static void main(String[] args) {
-		SpringApplication.run(Application.class);
-	}
-}
diff --git a/tests/camel-spring-boot-integration-tests/integration-common/src/main/java/org/apache/camel/integration/springboot/SpringBootBaseIntegration.java b/tests/camel-spring-boot-integration-tests/integration-common/src/main/java/org/apache/camel/integration/springboot/SpringBootBaseIntegration.java
deleted file mode 100644
index b35ec7e3981..00000000000
--- a/tests/camel-spring-boot-integration-tests/integration-common/src/main/java/org/apache/camel/integration/springboot/SpringBootBaseIntegration.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.integration.springboot;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-
-@CamelSpringBootTest
-@SpringBootTest(classes = Application.class)
-public class SpringBootBaseIntegration {
-
-	@Autowired
-	protected CamelContext camelContext;
-
-	@Autowired
-	protected ProducerTemplate producerTemplate;
-
-}
diff --git a/tests/camel-spring-boot-integration-tests/pom.xml b/tests/camel-spring-boot-integration-tests/pom.xml
deleted file mode 100644
index 59f43b6777e..00000000000
--- a/tests/camel-spring-boot-integration-tests/pom.xml
+++ /dev/null
@@ -1,68 +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>tests</artifactId>
-		<groupId>org.apache.camel.springboot</groupId>
-		<version>3.18.0-SNAPSHOT</version>
-	</parent>
-	<modelVersion>4.0.0</modelVersion>
-
-	<artifactId>camel-spring-boot-integration-tests</artifactId>
-	<name>Camel SB :: Integration Tests</name>
-	<description>Spring-Boot Camel integration test</description>
-	<modules>
-		<module>integration-common</module>
-		<module>infinispan</module>
-	</modules>
-	<packaging>pom</packaging>
-
-	<dependencies>
-		<dependency>
-			<groupId>org.apache.camel</groupId>
-			<artifactId>camel-support</artifactId>
-		</dependency>
-
-		<!-- Spring Boot -->
-		<dependency>
-			<groupId>org.springframework.boot</groupId>
-			<artifactId>spring-boot-starter</artifactId>
-			<version>${spring-boot-version}</version>
-		</dependency>
-		<!-- Camel -->
-		<dependency>
-			<groupId>org.apache.camel.springboot</groupId>
-			<artifactId>camel-spring-boot-starter</artifactId>
-		</dependency>
-
-		<dependency>
-			<groupId>org.springframework.boot</groupId>
-			<artifactId>spring-boot-starter-test</artifactId>
-			<version>${spring-boot-version}</version>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.camel</groupId>
-			<artifactId>camel-test-spring-junit5</artifactId>
-		</dependency>
-	</dependencies>
-
-</project>
diff --git a/tests/pom.xml b/tests/pom.xml
index 9a05c39a03a..ddc4aba159f 100644
--- a/tests/pom.xml
+++ b/tests/pom.xml
@@ -36,7 +36,6 @@
 
     <modules>
         <module>camel-itest-spring-boot</module>
-        <module>camel-spring-boot-integration-tests</module>
     </modules>
 
 </project>