camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ra...@apache.org
Subject [23/27] camel git commit: CAMEL-9766: camel-itest-karaf to get working on karaf 4. Use a script to run the tests reliable.
Date Mon, 28 Mar 2016 10:31:09 GMT
CAMEL-9766: camel-itest-karaf to get working on karaf 4. Use a script to run the tests reliable.


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

Branch: refs/heads/jdk8-lambdas
Commit: 930d4fe62acb203ded8f8ed21aa5fcc0aa0cb3ca
Parents: ab16fa2
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sun Mar 27 18:20:45 2016 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sun Mar 27 18:20:45 2016 +0200

----------------------------------------------------------------------
 .../camel/component/ignite/IgniteComponent.java      | 15 +++------------
 .../camel/itest/karaf/AbstractFeatureTest.java       |  3 +--
 .../apache/camel/itest/karaf/CamelIgniteTest.java    | 14 +++++++++++---
 .../src/test/resources/jre.properties                |  3 +++
 4 files changed, 18 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/930d4fe6/components/camel-ignite/src/main/java/org/apache/camel/component/ignite/IgniteComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-ignite/src/main/java/org/apache/camel/component/ignite/IgniteComponent.java
b/components/camel-ignite/src/main/java/org/apache/camel/component/ignite/IgniteComponent.java
index 587d9be..beccf93 100644
--- a/components/camel-ignite/src/main/java/org/apache/camel/component/ignite/IgniteComponent.java
+++ b/components/camel-ignite/src/main/java/org/apache/camel/component/ignite/IgniteComponent.java
@@ -179,13 +179,13 @@ public class IgniteComponent extends UriEndpointComponent {
             return;
         }
 
-        ignite.close();
+        if (ignite != null) {
+            ignite.close();
+        }
     }
 
     /**
      * Returns the {@link Ignite} instance.
-     * 
-     * @return
      */
     public Ignite getIgnite() {
         return ignite;
@@ -193,8 +193,6 @@ public class IgniteComponent extends UriEndpointComponent {
 
     /**
      * Sets the {@link Ignite} instance.
-     * 
-     * @param ignite
      */
     public void setIgnite(Ignite ignite) {
         this.ignite = ignite;
@@ -203,8 +201,6 @@ public class IgniteComponent extends UriEndpointComponent {
     /**
      * Gets the resource from where to load the configuration. It can be a: {@link URI},
{@link String} (URI) 
      * or an {@link InputStream}.
-     * 
-     * @return
      */
     public Object getConfigurationResource() {
         return configurationResource;
@@ -213,8 +209,6 @@ public class IgniteComponent extends UriEndpointComponent {
     /**
      * Sets the resource from where to load the configuration. It can be a: {@link URI},
{@link String} (URI) 
      * or an {@link InputStream}.
-     * 
-     * @param configurationResource
      */
     public void setConfigurationResource(Object configurationResource) {
         this.configurationResource = configurationResource;
@@ -222,7 +216,6 @@ public class IgniteComponent extends UriEndpointComponent {
 
     /**
      * Gets the {@link IgniteConfiguration} if the user set it explicitly.
-     * @return
      */
     public IgniteConfiguration getIgniteConfiguration() {
         return igniteConfiguration;
@@ -230,8 +223,6 @@ public class IgniteComponent extends UriEndpointComponent {
 
     /**
      * Allows the user to set a programmatic {@link IgniteConfiguration}.
-     * 
-     * @param igniteConfiguration
      */
     public void setIgniteConfiguration(IgniteConfiguration igniteConfiguration) {
         this.igniteConfiguration = igniteConfiguration;

http://git-wip-us.apache.org/repos/asf/camel/blob/930d4fe6/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/AbstractFeatureTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/AbstractFeatureTest.java
b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/AbstractFeatureTest.java
index 4c8ed2f..6fa7905 100644
--- a/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/AbstractFeatureTest.java
+++ b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/AbstractFeatureTest.java
@@ -60,10 +60,9 @@ import static org.ops4j.pax.exam.CoreOptions.maven;
 import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
 import static org.ops4j.pax.exam.CoreOptions.vmOption;
 
-
 public abstract class AbstractFeatureTest {
 
-    private static final Logger LOG = LoggerFactory.getLogger(AbstractFeatureTest.class);
+    protected static final Logger LOG = LoggerFactory.getLogger(AbstractFeatureTest.class);
 
     @Inject
     protected BundleContext bundleContext;

http://git-wip-us.apache.org/repos/asf/camel/blob/930d4fe6/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelIgniteTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelIgniteTest.java
b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelIgniteTest.java
index b28f6b3..a7eb497 100644
--- a/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelIgniteTest.java
+++ b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelIgniteTest.java
@@ -16,20 +16,28 @@
  */
 package org.apache.camel.itest.karaf;
 
-import org.junit.Ignore;
+import java.net.URI;
+
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.ops4j.pax.exam.junit.PaxExam;
 
 @RunWith(PaxExam.class)
-@Ignore
 public class CamelIgniteTest extends AbstractFeatureTest {
 
     public static final String COMPONENT = extractName(CamelIgniteTest.class);
 
     @Test
     public void test() throws Exception {
-        // TODO: we need to install some ignite stuff first (see the info of camel feature)
+        // install ignite first
+        String version = "1.5.0.final";
+        LOG.info("Using Apache Ignite version: {}", version);
+        URI url = new URI("mvn:org.apache.ignite/ignite-osgi-karaf/" + version + "/xml/features");
+
+        featuresService.addRepository(url);
+        featuresService.installFeature("ignite-core");
+        featuresService.installFeature("ignite-camel");
+
         testComponent(COMPONENT);
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/930d4fe6/tests/camel-itest-karaf/src/test/resources/jre.properties
----------------------------------------------------------------------
diff --git a/tests/camel-itest-karaf/src/test/resources/jre.properties b/tests/camel-itest-karaf/src/test/resources/jre.properties
index aa0a13c..f50daf3 100644
--- a/tests/camel-itest-karaf/src/test/resources/jre.properties
+++ b/tests/camel-itest-karaf/src/test/resources/jre.properties
@@ -24,6 +24,7 @@
 # Standard package set.  Note that:
 #   - javax.transaction* is exported with a mandatory attribute
 jre-1.6= \
+ sun.nio.ch, \
  com.sun.source.tree, \
  com.sun.tools.xjc, \
  javax.accessibility, \
@@ -189,6 +190,7 @@ jre-1.6= \
 # Standard package set.  Note that:
 #   - javax.transaction* is exported with a mandatory attribute
 jre-1.7= \
+ sun.nio.ch, \
  com.sun.source.tree, \
  com.sun.tools.xjc, \
  javax.accessibility, \
@@ -352,6 +354,7 @@ jre-1.7= \
  org.xml.sax.helpers
 
 jre-1.8= \
+ sun.nio.ch, \
  com.sun.source.tree, \
  com.sun.tools.xjc, \
  javax.accessibility, \


Mime
View raw message