camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/2] camel git commit: Fixed tests
Date Thu, 06 Aug 2015 09:06:08 GMT
Fixed tests


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

Branch: refs/heads/master
Commit: 0a5c9a2c9b5b667ca170a44ec1ba2cc89e66090b
Parents: 7e54c2f
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Thu Aug 6 10:48:48 2015 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Thu Aug 6 11:13:38 2015 +0200

----------------------------------------------------------------------
 .../org/apache/camel/component/quartz2/QuartzHelper.java  |  3 ++-
 .../apache/camel/component/quartz2/BaseQuartzTest.java    |  5 +++--
 .../component/quartz2/QuartzEndpointConfigureTest.java    |  4 ++--
 .../camel/component/quartz2/QuartzManagementTest.java     | 10 ----------
 4 files changed, 7 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/0a5c9a2c/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/QuartzHelper.java
----------------------------------------------------------------------
diff --git a/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/QuartzHelper.java
b/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/QuartzHelper.java
index 1a78d79..f676a36 100644
--- a/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/QuartzHelper.java
+++ b/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/QuartzHelper.java
@@ -35,7 +35,8 @@ public final class QuartzHelper {
         if (camelContext.getManagementName() != null) {
             return camelContext.getManagementName();
         } else {
-            return camelContext.getManagementNameStrategy().getName();
+            // fallback as name
+            return camelContext.getName();
         }
     }
     

http://git-wip-us.apache.org/repos/asf/camel/blob/0a5c9a2c/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/BaseQuartzTest.java
----------------------------------------------------------------------
diff --git a/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/BaseQuartzTest.java
b/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/BaseQuartzTest.java
index 178a11a..f914744 100644
--- a/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/BaseQuartzTest.java
+++ b/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/BaseQuartzTest.java
@@ -21,7 +21,8 @@ import org.apache.camel.test.junit4.CamelTestSupport;
 
 public class BaseQuartzTest extends CamelTestSupport {
 
-    protected boolean isEnableJmx() {
+    @Override
+    protected boolean useJmx() {
         return true;
     }
 
@@ -30,7 +31,7 @@ public class BaseQuartzTest extends CamelTestSupport {
         CamelContext context = super.createCamelContext();
 
         QuartzComponent quartz = context.getComponent("quartz2", QuartzComponent.class);
-        quartz.setEnableJmx(isEnableJmx());
+        quartz.setEnableJmx(useJmx());
 
         return context;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/0a5c9a2c/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/QuartzEndpointConfigureTest.java
----------------------------------------------------------------------
diff --git a/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/QuartzEndpointConfigureTest.java
b/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/QuartzEndpointConfigureTest.java
index 13f94ce..f524f61 100644
--- a/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/QuartzEndpointConfigureTest.java
+++ b/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/QuartzEndpointConfigureTest.java
@@ -58,9 +58,9 @@ public class QuartzEndpointConfigureTest extends BaseQuartzTest {
         JobDetail jobDetail = scheduler.getJobDetail(JobKey.jobKey(triggerKey.getName(),
triggerKey.getGroup()));
 
         assertEquals("getName()", "myName", triggerKey.getName());
-        assertEquals("getGroup()", "Camel", triggerKey.getGroup());
+        assertEquals("getGroup()", "Camel_" + context.getManagementName(), triggerKey.getGroup());
         assertEquals("getJobName", "myName", jobDetail.getKey().getName());
-        assertEquals("getJobGroup", "Camel", jobDetail.getKey().getGroup());
+        assertEquals("getJobGroup", "Camel_" + context.getManagementName(), jobDetail.getKey().getGroup());
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/camel/blob/0a5c9a2c/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/QuartzManagementTest.java
----------------------------------------------------------------------
diff --git a/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/QuartzManagementTest.java
b/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/QuartzManagementTest.java
index b65820a..e9a6c85 100644
--- a/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/QuartzManagementTest.java
+++ b/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/QuartzManagementTest.java
@@ -24,16 +24,6 @@ import org.junit.Test;
 
 public class QuartzManagementTest extends BaseQuartzTest {
 
-    @Override
-    protected boolean useJmx() {
-        return true;
-    }
-
-    @Override
-    protected boolean isEnableJmx() {
-        return true;
-    }
-
     protected MBeanServer getMBeanServer() {
         return context.getManagementStrategy().getManagementAgent().getMBeanServer();
     }


Mime
View raw message