Author: dkulp Date: Thu Jan 12 19:18:19 2012 New Revision: 1230710 URL: http://svn.apache.org/viewvc?rev=1230710&view=rev Log: Better search in a test so if the Bus itself configures in a new interceptor, test won't fail. Also add test dep into pom instead of grabbing transitively to make sure the requested version is picked up
Modified: camel/trunk/components/camel-cxf/pom.xml camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanWithBusTest.java Modified: camel/trunk/components/camel-cxf/pom.xml URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/pom.xml?rev=1230710&r1=1230709&r2=1230710&view=diff ============================================================================== --- camel/trunk/components/camel-cxf/pom.xml (original) +++ camel/trunk/components/camel-cxf/pom.xml Thu Jan 12 19:18:19 2012 @@ -157,6 +157,12 @@ <version>${cxf-version}</version> <scope>test</scope> </dependency> + <dependency> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-rt-bindings-soap</artifactId> + <version>${cxf-version}</version> + <scope>test</scope> + </dependency> <dependency> <groupId>org.apache.camel</groupId> Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanWithBusTest.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanWithBusTest.java?rev=1230710&r1=1230709&r2=1230710&view=diff ============================================================================== --- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanWithBusTest.java (original) +++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanWithBusTest.java Thu Jan 12 19:18:19 2012 @@ -19,6 +19,7 @@ package org.apache.camel.component.cxf.s import org.apache.camel.CamelContext; import org.apache.camel.component.cxf.CXFTestSupport; import org.apache.camel.component.cxf.CxfEndpoint; +import org.apache.cxf.interceptor.Interceptor; import org.apache.cxf.interceptor.LoggingInInterceptor; import org.junit.Test; @@ -45,7 +46,12 @@ public class CxfEndpointBeanWithBusTest // Spring 3.0.0 has an issue of SPR-6589 which will call the BusApplicationListener twice for the same event, // so we will get more one InInterceptors here assertTrue(endpoint.getBus().getInInterceptors().size() >= 1); - assertEquals(LoggingInInterceptor.class, endpoint.getBus().getInInterceptors().get(0).getClass()); + for (Interceptor<?> i : endpoint.getBus().getInInterceptors()) { + if (i instanceof LoggingInInterceptor) { + return; + } + } + fail("Could not find the LoggingInInterceptor on the bus. " + endpoint.getBus().getInInterceptors()); } @Test