This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch camel-spring-boot-3.18.x in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
The following commit(s) were added to refs/heads/camel-spring-boot-3.18.x by this push: new 10fa3c1084e [CAMEL-18729]fix NoParamTest failure 10fa3c1084e is described below commit 10fa3c1084e5ddfc020953b0c7e802c0774c2ab4 Author: Freeman Fang <freeman.f...@gmail.com> AuthorDate: Fri Nov 25 10:21:19 2022 -0500 [CAMEL-18729]fix NoParamTest failure (cherry picked from commit 117bc0168e0ec71f3ece9226523a6c76a24a813d) --- .../cxf/soap/springboot/noparam/NoParamTest.java | 23 +++++++++++----------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/components-starter/camel-cxf-soap-starter/src/test/java/org/apache/camel/component/cxf/soap/springboot/noparam/NoParamTest.java b/components-starter/camel-cxf-soap-starter/src/test/java/org/apache/camel/component/cxf/soap/springboot/noparam/NoParamTest.java index cd9d9f46660..bb9e55f31de 100644 --- a/components-starter/camel-cxf-soap-starter/src/test/java/org/apache/camel/component/cxf/soap/springboot/noparam/NoParamTest.java +++ b/components-starter/camel-cxf-soap-starter/src/test/java/org/apache/camel/component/cxf/soap/springboot/noparam/NoParamTest.java @@ -18,7 +18,6 @@ package org.apache.camel.component.cxf.soap.springboot.noparam; -import javax.xml.ws.Endpoint; import org.apache.camel.ExchangePattern; import org.apache.camel.ProducerTemplate; @@ -35,7 +34,6 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.annotation.DirtiesContext; -import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -63,14 +61,7 @@ public class NoParamTest { static int port = CXFTestSupport.getPort1(); - @BeforeEach - public void setup() { - Object implementor = new org.apache.camel.component.cxf.noparam.NoParamEndpoint(); - String address = "/cxf-noparam/"; - Endpoint.publish(address, implementor); - } - - + @Autowired @@ -104,6 +95,15 @@ public class NoParamTest { return cxfEndpoint; } + @Bean + CxfEndpoint noParamServiceEndpoint() { + CxfSpringEndpoint cxfEndpoint = new CxfSpringEndpoint(); + cxfEndpoint.setServiceClass(org.apache.camel.component.cxf.noparam.NoParamEndpoint.class); + cxfEndpoint.setAddress("http://localhost:" + port + + "/services/camel-noparam/"); + return cxfEndpoint; + } + @Bean public RouteBuilder routeBuilder() { return new RouteBuilder() { @@ -114,8 +114,7 @@ public class NoParamTest { .to("mock:end"); from("direct:noParam") - .to("cxf:bean:noParamEndpoint?address=" + "http://localhost:" + port - + "/services/camel-noparam/"); + .to("cxf:bean:noParamServiceEndpoint"); } }; }