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-10964: Stabilise CamelCxfBeanInjectTest which occasionally fails
Date Thu, 09 Mar 2017 12:35:11 GMT
Repository: camel
Updated Branches:
  refs/heads/master 1dfb70985 -> 2e1547c49


CAMEL-10964: Stabilise CamelCxfBeanInjectTest which occasionally fails


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

Branch: refs/heads/master
Commit: 2e1547c49027bf969dddb148c11e7065af8bb140
Parents: 1dfb709
Author: Tadayoshi Sato <sato.tadayoshi@gmail.com>
Authored: Thu Mar 9 20:10:00 2017 +0900
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Thu Mar 9 13:34:47 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/camel/test/karaf/AbstractFeatureTest.java     | 3 ++-
 .../java/org/apache/camel/itest/cxf/CamelCxfBeanInjectTest.java   | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/2e1547c4/components/camel-test-karaf/src/main/java/org/apache/camel/test/karaf/AbstractFeatureTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-karaf/src/main/java/org/apache/camel/test/karaf/AbstractFeatureTest.java
b/components/camel-test-karaf/src/main/java/org/apache/camel/test/karaf/AbstractFeatureTest.java
index 4a15d4c..8b5e84a 100644
--- a/components/camel-test-karaf/src/main/java/org/apache/camel/test/karaf/AbstractFeatureTest.java
+++ b/components/camel-test-karaf/src/main/java/org/apache/camel/test/karaf/AbstractFeatureTest.java
@@ -158,7 +158,8 @@ public abstract class AbstractFeatureTest {
 
     protected void overridePropertiesWithConfigAdmin(String pid, Properties props) throws
IOException {
         ConfigurationAdmin configAdmin = getOsgiService(bundleContext, ConfigurationAdmin.class);
-        Configuration config = configAdmin.getConfiguration(pid);
+        // passing null as second argument ties the configuration to correct bundle.
+        Configuration config = configAdmin.getConfiguration(pid, null);
         if (config == null) {
             throw new IllegalArgumentException("Cannot find configuration with pid " + pid
+ " in OSGi ConfigurationAdmin service.");
         }

http://git-wip-us.apache.org/repos/asf/camel/blob/2e1547c4/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/cxf/CamelCxfBeanInjectTest.java
----------------------------------------------------------------------
diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/cxf/CamelCxfBeanInjectTest.java
b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/cxf/CamelCxfBeanInjectTest.java
index 42f61f1..a8f5198 100644
--- a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/cxf/CamelCxfBeanInjectTest.java
+++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/cxf/CamelCxfBeanInjectTest.java
@@ -44,7 +44,7 @@ import org.osgi.framework.Constants;
 @RunWith(PaxExam.class)
 public class CamelCxfBeanInjectTest extends AbstractFeatureTest {
 
-    private static final int PORT = AvailablePortFinder.getNextAvailable();
+    private static final int PORT = AvailablePortFinder.getNextAvailable(30000);
     private static final String ENDPOINT_ADDRESS = String.format(
         "http://localhost:%s/CamelCxfBeanInjectTest/router", PORT);
 


Mime
View raw message