This is an automated email from the ASF dual-hosted git repository. fmariani 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 399033abeef CAMEL-20687: Kamelet have generated id to avoid duplicates 399033abeef is described below commit 399033abeef742a93c77e795452a2e4cc80f92c4 Author: Croway <federico.mariani.1...@gmail.com> AuthorDate: Mon Oct 21 11:31:04 2024 +0200 CAMEL-20687: Kamelet have generated id to avoid duplicates --- .../kamelet/springboot/KameletRouteTest.java | 32 ++++++---------------- 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/components-starter/camel-kamelet-starter/src/test/java/org/apache/camel/component/kamelet/springboot/KameletRouteTest.java b/components-starter/camel-kamelet-starter/src/test/java/org/apache/camel/component/kamelet/springboot/KameletRouteTest.java index 76f35e63a58..c038165c3e1 100644 --- a/components-starter/camel-kamelet-starter/src/test/java/org/apache/camel/component/kamelet/springboot/KameletRouteTest.java +++ b/components-starter/camel-kamelet-starter/src/test/java/org/apache/camel/component/kamelet/springboot/KameletRouteTest.java @@ -16,29 +16,25 @@ */ package org.apache.camel.component.kamelet.springboot; -import java.util.UUID; - -import org.apache.camel.FailedToCreateRouteException; +import org.apache.camel.CamelContext; +import org.apache.camel.FluentProducerTemplate; import org.apache.camel.RoutesBuilder; import org.apache.camel.builder.RouteBuilder; -import org.junit.jupiter.api.Test; import org.apache.camel.spring.boot.CamelAutoConfiguration; -import org.apache.camel.FluentProducerTemplate; -import org.apache.camel.CamelContext; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.jupiter.api.Assertions.assertThrows; - +import org.apache.camel.test.spring.junit5.CamelSpringBootTest; +import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.context.annotation.Bean; import org.springframework.test.annotation.DirtiesContext; -import org.apache.camel.test.spring.junit5.CamelSpringBootTest; + +import java.util.UUID; + +import static org.assertj.core.api.Assertions.assertThat; @DirtiesContext @CamelSpringBootTest @SpringBootTest(classes = { CamelAutoConfiguration.class, KameletRouteTest.class, }) - public class KameletRouteTest { @Autowired @@ -61,18 +57,6 @@ public class KameletRouteTest { assertThat(fluentTemplate.toF("direct:chain").withBody(body).request(String.class)).isEqualTo("b-a-" + body); } - @Test - public void duplicateRouteId() { - RouteBuilder rb = new RouteBuilder(context) { - @Override - public void configure() { - from("direct:start").to("kamelet:echo/test?prefix=test"); - } - }; - - assertThrows(FailedToCreateRouteException.class, () -> rb.addRoutesToCamelContext(context)); - } - // ********************************************** // // test set-up