camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject camel git commit: CAMEL-6976: Make camel-itest-cdi work again. It was a bit tricky due some weird deltaspike error - needed to add those packages.
Date Fri, 10 Jul 2015 11:24:31 GMT
Repository: camel
Updated Branches:
  refs/heads/master 43c4b2c68 -> dac1118f8


CAMEL-6976: Make camel-itest-cdi work again. It was a bit tricky due some weird deltaspike
error - needed to add those packages.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/dac1118f
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/dac1118f
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/dac1118f

Branch: refs/heads/master
Commit: dac1118f8cac2456188dca22cd65cf861900a3ed
Parents: 43c4b2c
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Fri Jul 10 13:30:56 2015 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Fri Jul 10 13:30:56 2015 +0200

----------------------------------------------------------------------
 parent/pom.xml                                  |   4 +-
 tests/camel-itest-cdi/pom.xml                   | 165 ++++++++++---------
 .../apache/camel/itest/cdi/CamelCdiTest.java    | 142 ++++++++++++++++
 .../apache/camel/itest/cdi/IntegrationTest.java | 136 ---------------
 .../properties/PropertiesConfigurationTest.java |   7 +
 5 files changed, 235 insertions(+), 219 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/dac1118f/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index c96695c..4a621f4 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -49,8 +49,8 @@
     <aries-blueprint-proxy-version>1.0.0</aries-blueprint-proxy-version>
     <aries-blueprint-proxy-impl-version>1.0.1</aries-blueprint-proxy-impl-version>
     <aries-util-version>1.1.0</aries-util-version>
-    <arquillian-junit-container-version>1.0.0.CR7</arquillian-junit-container-version>
-    <arquillian-weld-ee-embedded-version>1.0.0.CR3</arquillian-weld-ee-embedded-version>
+    <arquillian-junit-container-version>1.1.8.Final</arquillian-junit-container-version>
+    <arquillian-weld-se-embedded-version>1.0.0.CR8</arquillian-weld-se-embedded-version>
     <asm-bundle-version>3.3.1_1</asm-bundle-version>
     <asm-version>3.3.1</asm-version>
     <aspectj-version>1.8.6</aspectj-version>

http://git-wip-us.apache.org/repos/asf/camel/blob/dac1118f/tests/camel-itest-cdi/pom.xml
----------------------------------------------------------------------
diff --git a/tests/camel-itest-cdi/pom.xml b/tests/camel-itest-cdi/pom.xml
index 3b3d619..2d5a34a 100644
--- a/tests/camel-itest-cdi/pom.xml
+++ b/tests/camel-itest-cdi/pom.xml
@@ -14,98 +14,101 @@
     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/maven-v4_0_0.xsd">
+<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/maven-v4_0_0.xsd">
 
-    <modelVersion>4.0.0</modelVersion>
+  <modelVersion>4.0.0</modelVersion>
 
-    <parent>
-        <groupId>org.apache.camel</groupId>
-        <artifactId>tests</artifactId>
-        <version>2.16-SNAPSHOT</version>
-    </parent>
+  <parent>
+    <groupId>org.apache.camel</groupId>
+    <artifactId>tests</artifactId>
+    <version>2.16-SNAPSHOT</version>
+  </parent>
 
-    <artifactId>camel-itest-cdi</artifactId>
-    <name>Camel :: Integration Tests :: CDI</name>
-    <description>Tests for camel-cdi</description>
+  <artifactId>camel-itest-cdi</artifactId>
+  <name>Camel :: Integration Tests :: CDI</name>
+  <description>Tests for camel-cdi</description>
 
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>camel-cdi</artifactId>
-        </dependency>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-cdi</artifactId>
+    </dependency>
 
-        <!-- logging -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-        </dependency>
+    <!-- cdi api -->
+    <dependency>
+      <groupId>javax.enterprise</groupId>
+      <artifactId>cdi-api</artifactId>
+      <version>${cdi-api-version}</version>
+    </dependency>
+
+    <!-- logging -->
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-log4j12</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+    </dependency>
+
+    <!-- for testing -->
+    <dependency>
+      <groupId>org.apache.deltaspike.core</groupId>
+      <artifactId>deltaspike-core-impl</artifactId>
+      <version>${deltaspike-version}</version>
+      <scope>test</scope>
+    </dependency>
+
+    <!-- for testing -->
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.arquillian.junit</groupId>
+      <artifactId>arquillian-junit-container</artifactId>
+      <version>${arquillian-junit-container-version}</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <profiles>
+
+    <profile>
+      <id>weld2</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <dependencies>
         <dependency>
-            <groupId>log4j</groupId>
-            <artifactId>log4j</artifactId>
+          <groupId>org.apache.deltaspike.cdictrl</groupId>
+          <artifactId>deltaspike-cdictrl-weld</artifactId>
+          <version>${deltaspike-version}</version>
+          <scope>test</scope>
         </dependency>
-
-        <!-- for testing -->
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
+          <groupId>org.jboss.weld.se</groupId>
+          <artifactId>weld-se-core</artifactId>
+          <version>${weld2-version}</version>
+          <scope>provided</scope>
         </dependency>
         <dependency>
-            <groupId>org.jboss.arquillian.junit</groupId>
-            <artifactId>arquillian-junit-container</artifactId>
-            <version>${arquillian-junit-container-version}</version>
-            <scope>test</scope>
+          <groupId>org.jboss.arquillian.container</groupId>
+          <artifactId>arquillian-weld-se-embedded-1.1</artifactId>
+          <version>${arquillian-weld-se-embedded-version}</version>
+          <exclusions>
+            <exclusion>
+              <groupId>org.jboss.arquillian.container</groupId>
+              <artifactId>arquillian-container-spi</artifactId>
+            </exclusion>
+          </exclusions>
+          <scope>test</scope>
         </dependency>
-    </dependencies>
-
-    <build>
-      <plugins>
-        <plugin>
-          <!-- lets re-enable IntegrationTest -->
-          <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-surefire-plugin</artifactId>
-          <configuration>
-            <includes>
-              <include>**/*Test.java</include>
-            </includes>
-            <!-- CDI embedded test doesnt work CAMEL-6976 -->
-            <excludes>
-              <exclude>**/*Test.java</exclude>
-              <exclude>**/*XXXTest.*</exclude>
-            </excludes>
-          </configuration>
-        </plugin>
-      </plugins>
-    </build>
+      </dependencies>
+    </profile>
 
-    <profiles>
-        <profile>
-            <id>arquillian-weld-ee-embedded</id>
-            <activation>
-                <activeByDefault>true</activeByDefault>
-            </activation>
-            <dependencies>
-                <dependency>
-                    <groupId>org.jboss.spec</groupId>
-                    <artifactId>jboss-javaee-6.0</artifactId>
-                    <version>${jboss-javaee-6-version}</version>
-                    <type>pom</type>
-                    <scope>provided</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.jboss.arquillian.container</groupId>
-                    <artifactId>arquillian-weld-ee-embedded-1.1</artifactId>
-                    <version>${arquillian-weld-ee-embedded-version}</version>
-                    <scope>test</scope>
-                </dependency>
-                <dependency>
-                    <groupId>org.jboss.weld</groupId>
-                    <artifactId>weld-core</artifactId>
-                    <version>${weld2-version}</version>
-                    <scope>test</scope>
-                </dependency>
-            </dependencies>
-        </profile>
-    </profiles>
+  </profiles>
 
 </project>

http://git-wip-us.apache.org/repos/asf/camel/blob/dac1118f/tests/camel-itest-cdi/src/test/java/org/apache/camel/itest/cdi/CamelCdiTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest-cdi/src/test/java/org/apache/camel/itest/cdi/CamelCdiTest.java
b/tests/camel-itest-cdi/src/test/java/org/apache/camel/itest/cdi/CamelCdiTest.java
new file mode 100644
index 0000000..ce4ab38
--- /dev/null
+++ b/tests/camel-itest-cdi/src/test/java/org/apache/camel/itest/cdi/CamelCdiTest.java
@@ -0,0 +1,142 @@
+/**
+ * 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.itest.cdi;
+
+import java.util.Map;
+import java.util.Set;
+import javax.inject.Inject;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.Endpoint;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.cdi.Uri;
+import org.apache.camel.cdi.internal.CamelContextMap;
+import org.apache.camel.cdi.internal.CamelExtension;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.util.CamelContextHelper;
+import org.apache.deltaspike.core.impl.scope.conversation.ConversationBeanHolder;
+import org.apache.deltaspike.core.impl.scope.viewaccess.ViewAccessBeanHolder;
+import org.apache.deltaspike.core.impl.scope.window.WindowBeanHolder;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.asset.EmptyAsset;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+@RunWith(Arquillian.class)
+public class CamelCdiTest {
+    private static final Logger LOG = LoggerFactory.getLogger(CamelCdiTest.class);
+
+    @Inject
+    CamelContextMap camelContextMap;
+    @Inject
+    RoutesContextA routesA;
+    @Inject
+    RoutesContextB routesB;
+    @Inject
+    RoutesContextC routesC;
+    @Inject
+    RoutesContextD routesD;
+
+    @Inject @Uri(value = "seda:foo", context = "contextD")
+    ProducerTemplate producerD;
+
+    @Test
+    public void checkContextsHaveCorrectEndpointsAndRoutes() throws Exception {
+        Set<Map.Entry<String, CamelContext>> entries = camelContextMap.getCamelContextMap().entrySet();
+        for (Map.Entry<String, CamelContext> entry : entries) {
+            LOG.info("CamelContext " + entry.getKey() + " has endpoints: " + entry.getValue().getEndpointMap().keySet());
+        }
+
+        CamelContext contextA = assertCamelContext("contextA");
+        assertHasEndpoints(contextA, "seda://A.a", "mock://A.b");
+
+        MockEndpoint mockEndpoint = routesA.b;
+        mockEndpoint.expectedBodiesReceived(Constants.EXPECTED_BODIES_A);
+        routesA.sendMessages();
+        mockEndpoint.assertIsSatisfied();
+
+        CamelContext contextB = assertCamelContext("contextB");
+        assertHasEndpoints(contextB, "seda://B.a", "mock://B.b");
+
+        MockEndpoint mockEndpointB = routesB.b;
+        mockEndpointB.expectedBodiesReceived(Constants.EXPECTED_BODIES_B);
+        routesB.sendMessages();
+        mockEndpointB.assertIsSatisfied();
+
+        // lets check the routes where we default the context from the @ContextName
+        CamelContext contextC = assertCamelContext("contextC");
+        assertHasEndpoints(contextC, "seda://C.a", "mock://C.b");
+
+        MockEndpoint mockEndpointC = routesC.b;
+        mockEndpointC.expectedBodiesReceived(Constants.EXPECTED_BODIES_C);
+        routesC.sendMessages();
+        mockEndpointC.assertIsSatisfied();
+
+        CamelContext contextD = assertCamelContext("contextD");
+        assertHasEndpoints(contextD, "seda://D.a", "mock://D.b");
+
+        MockEndpoint mockEndpointD = routesD.b;
+        mockEndpointD.expectedBodiesReceived(Constants.EXPECTED_BODIES_D);
+        routesD.sendMessages();
+        mockEndpointD.assertIsSatisfied();
+
+        CamelContext contextE = assertCamelContext("contextD");
+        assertHasEndpoints(contextE, "seda://D.a", "mock://D.b");
+        MockEndpoint mockDb = CamelContextHelper.getMandatoryEndpoint(contextE, "mock://D.b",
MockEndpoint.class);
+        mockDb.reset();
+        mockDb.expectedBodiesReceived(Constants.EXPECTED_BODIES_D_A);
+        for (Object body : Constants.EXPECTED_BODIES_D_A) {
+            producerD.sendBody("seda:D.a", body);
+        }
+        mockDb.assertIsSatisfied();
+    }
+
+    public static void assertHasEndpoints(CamelContext context, String... uris) {
+        Map<String, Endpoint> endpointMap = context.getEndpointMap();
+        for (String uri : uris) {
+            Endpoint endpoint = endpointMap.get(uri);
+            assertNotNull("CamelContext " + context + " does not have an Endpoint with URI
" + uri + " but has " + endpointMap.keySet(), endpoint);
+        }
+    }
+
+    protected CamelContext assertCamelContext(String contextName) {
+        assertNotNull("camelContextMap not injected!", camelContextMap);
+        CamelContext answer = camelContextMap.getMandatoryCamelContext(contextName);
+        assertTrue("CamelContext '" + contextName + "' is not started", answer.getStatus().isStarted());
+        return answer;
+    }
+
+    @Deployment
+    public static JavaArchive createDeployment() {
+        return ShrinkWrap.create(JavaArchive.class)
+                .addPackage(CamelExtension.class.getPackage())
+                .addPackage(RoutesContextA.class.getPackage())
+                // add a bunch of deltaspike packages so we can find those cdi beans to make
arquillian happy
+                .addPackage(WindowBeanHolder.class.getPackage())
+                .addPackage(ConversationBeanHolder.class.getPackage())
+                .addPackage(ViewAccessBeanHolder.class.getPackage())
+                .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/dac1118f/tests/camel-itest-cdi/src/test/java/org/apache/camel/itest/cdi/IntegrationTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest-cdi/src/test/java/org/apache/camel/itest/cdi/IntegrationTest.java
b/tests/camel-itest-cdi/src/test/java/org/apache/camel/itest/cdi/IntegrationTest.java
deleted file mode 100644
index 7333509..0000000
--- a/tests/camel-itest-cdi/src/test/java/org/apache/camel/itest/cdi/IntegrationTest.java
+++ /dev/null
@@ -1,136 +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.itest.cdi;
-
-import java.util.Map;
-import java.util.Set;
-
-import javax.inject.Inject;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.Endpoint;
-import org.apache.camel.ProducerTemplate;
-import org.apache.camel.cdi.Uri;
-import org.apache.camel.cdi.internal.CamelContextMap;
-import org.apache.camel.cdi.internal.CamelExtension;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.util.CamelContextHelper;
-import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.shrinkwrap.api.ShrinkWrap;
-import org.jboss.shrinkwrap.api.asset.EmptyAsset;
-import org.jboss.shrinkwrap.api.spec.JavaArchive;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-@RunWith(Arquillian.class)
-public class IntegrationTest {
-    private static final Logger LOG = LoggerFactory.getLogger(IntegrationTest.class);
-
-    @Inject
-    CamelContextMap camelContextMap;
-    @Inject
-    RoutesContextA routesA;
-    @Inject
-    RoutesContextB routesB;
-    @Inject
-    RoutesContextC routesC;
-    @Inject
-    RoutesContextD routesD;
-
-    @Inject @Uri(value = "seda:foo", context = "contextD")
-    ProducerTemplate producerD;
-
-    @Test
-    public void checkContextsHaveCorrectEndpointsAndRoutes() throws Exception {
-        Set<Map.Entry<String, CamelContext>> entries = camelContextMap.getCamelContextMap().entrySet();
-        for (Map.Entry<String, CamelContext> entry : entries) {
-            LOG.info("CamelContext " + entry.getKey() + " has endpoints: " + entry.getValue().getEndpointMap().keySet());
-        }
-
-        CamelContext contextA = assertCamelContext("contextA");
-        assertHasEndpoints(contextA, "seda://A.a", "mock://A.b");
-
-        MockEndpoint mockEndpoint = routesA.b;
-        mockEndpoint.expectedBodiesReceived(Constants.EXPECTED_BODIES_A);
-        routesA.sendMessages();
-        mockEndpoint.assertIsSatisfied();
-
-        CamelContext contextB = assertCamelContext("contextB");
-        assertHasEndpoints(contextB, "seda://B.a", "mock://B.b");
-
-        MockEndpoint mockEndpointB = routesB.b;
-        mockEndpointB.expectedBodiesReceived(Constants.EXPECTED_BODIES_B);
-        routesB.sendMessages();
-        mockEndpointB.assertIsSatisfied();
-
-        // lets check the routes where we default the context from the @ContextName
-        CamelContext contextC = assertCamelContext("contextC");
-        assertHasEndpoints(contextC, "seda://C.a", "mock://C.b");
-
-        MockEndpoint mockEndpointC = routesC.b;
-        mockEndpointC.expectedBodiesReceived(Constants.EXPECTED_BODIES_C);
-        routesC.sendMessages();
-        mockEndpointC.assertIsSatisfied();
-
-        CamelContext contextD = assertCamelContext("contextD");
-        assertHasEndpoints(contextD, "seda://D.a", "mock://D.b");
-
-        MockEndpoint mockEndpointD = routesD.b;
-        mockEndpointD.expectedBodiesReceived(Constants.EXPECTED_BODIES_D);
-        routesD.sendMessages();
-        mockEndpointD.assertIsSatisfied();
-
-        CamelContext contextE = assertCamelContext("contextD");
-        assertHasEndpoints(contextE, "seda://D.a", "mock://D.b");
-        MockEndpoint mockDb = CamelContextHelper.getMandatoryEndpoint(contextE, "mock://D.b",
MockEndpoint.class);
-        mockDb.reset();
-        mockDb.expectedBodiesReceived(Constants.EXPECTED_BODIES_D_A);
-        for (Object body : Constants.EXPECTED_BODIES_D_A) {
-            producerD.sendBody("seda:D.a", body);
-        }
-        mockDb.assertIsSatisfied();
-    }
-
-    public static void assertHasEndpoints(CamelContext context, String... uris) {
-        Map<String, Endpoint> endpointMap = context.getEndpointMap();
-        for (String uri : uris) {
-            Endpoint endpoint = endpointMap.get(uri);
-            assertNotNull("CamelContext " + context + " does not have an Endpoint with URI
" + uri + " but has " + endpointMap.keySet(), endpoint);
-        }
-    }
-
-    protected CamelContext assertCamelContext(String contextName) {
-        assertNotNull("camelContextMap not injected!", camelContextMap);
-        CamelContext answer = camelContextMap.getMandatoryCamelContext(contextName);
-        assertTrue("CamelContext '" + contextName + "' is not started", answer.getStatus().isStarted());
-        return answer;
-    }
-
-    @Deployment
-    public static JavaArchive createDeployment() {
-        return ShrinkWrap.create(JavaArchive.class)
-                .addPackage(CamelExtension.class.getPackage())
-                .addPackage(RoutesContextA.class.getPackage())
-                .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
-    }
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/dac1118f/tests/camel-itest-cdi/src/test/java/org/apache/camel/itest/cdi/properties/PropertiesConfigurationTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest-cdi/src/test/java/org/apache/camel/itest/cdi/properties/PropertiesConfigurationTest.java
b/tests/camel-itest-cdi/src/test/java/org/apache/camel/itest/cdi/properties/PropertiesConfigurationTest.java
index 745cb10..c463cd9 100644
--- a/tests/camel-itest-cdi/src/test/java/org/apache/camel/itest/cdi/properties/PropertiesConfigurationTest.java
+++ b/tests/camel-itest-cdi/src/test/java/org/apache/camel/itest/cdi/properties/PropertiesConfigurationTest.java
@@ -21,6 +21,9 @@ import javax.inject.Inject;
 import org.apache.camel.CamelContext;
 import org.apache.camel.cdi.component.properties.CdiPropertiesComponent;
 import org.apache.camel.cdi.internal.CamelExtension;
+import org.apache.deltaspike.core.impl.scope.conversation.ConversationBeanHolder;
+import org.apache.deltaspike.core.impl.scope.viewaccess.ViewAccessBeanHolder;
+import org.apache.deltaspike.core.impl.scope.window.WindowBeanHolder;
 import org.jboss.arquillian.container.test.api.Deployment;
 import org.jboss.arquillian.junit.Arquillian;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
@@ -57,6 +60,10 @@ public class PropertiesConfigurationTest {
             .addPackage(CdiPropertiesComponent.class.getPackage())
             .addClass(Camel1Config.class)
             .addClass(Camel2Config.class)
+            // add a bunch of deltaspike packages so we can find those cdi beans to make
arquillian happy
+            .addPackage(WindowBeanHolder.class.getPackage())
+            .addPackage(ConversationBeanHolder.class.getPackage())
+            .addPackage(ViewAccessBeanHolder.class.getPackage())
             .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
     }
 }


Mime
View raw message