Updated Branches:
  refs/heads/camel-2.12.x c26cc9860 -> bd06f388b

Polished the comments a bit.


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

Branch: refs/heads/camel-2.12.x
Commit: bd06f388bf85305487b5022880a9a48d34d24fd5
Parents: c26cc98
Author: Babak Vahdat <bvah...@apache.org>
Authored: Mon Sep 30 16:39:07 2013 +0200
Committer: Babak Vahdat <bvah...@apache.org>
Committed: Mon Sep 30 16:40:15 2013 +0200

----------------------------------------------------------------------
 ...pringQuartzConsumerTwoAppsClusteredFailoverTest.java | 12 +++++++-----
 .../SpringQuartzTwoAppsClusteredFailoverTest.java       | 12 +++++++-----
 2 files changed, 14 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/bd06f388/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/SpringQuartzConsumerTwoAppsClusteredFailoverTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/SpringQuartzConsumerTwoAppsClusteredFailoverTest.java
 
b/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/SpringQuartzConsumerTwoAppsClusteredFailoverTest.java
index 9a5efdb..13773c7 100644
--- 
a/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/SpringQuartzConsumerTwoAppsClusteredFailoverTest.java
+++ 
b/components/camel-quartz/src/test/java/org/apache/camel/component/quartz/SpringQuartzConsumerTwoAppsClusteredFailoverTest.java
@@ -38,11 +38,13 @@ public class 
SpringQuartzConsumerTwoAppsClusteredFailoverTest extends TestSuppor
         AbstractXmlApplicationContext db = new 
ClassPathXmlApplicationContext("org/apache/camel/component/quartz/SpringQuartzConsumerClusteredAppDatabase.xml");
         db.start();
 
-        // now launch the first clustered app
+        // now launch the first clustered app which will acquire the quartz
+        // database lock and become the master
         AbstractXmlApplicationContext app = new 
ClassPathXmlApplicationContext("org/apache/camel/component/quartz/SpringQuartzConsumerClusteredAppOne.xml");
         app.start();
 
-        // as well as the second one
+        // as well as the second one which will run in slave modus as it will
+        // not be able to acquire the same lock
         AbstractXmlApplicationContext app2 = new 
ClassPathXmlApplicationContext("org/apache/camel/component/quartz/SpringQuartzConsumerClusteredAppTwo.xml");
         app2.start();
 
@@ -57,7 +59,7 @@ public class SpringQuartzConsumerTwoAppsClusteredFailoverTest 
extends TestSuppor
 
         mock.assertIsSatisfied();
 
-        // now let's simulate a crash of the first app
+        // now let's simulate a crash of the first app (the quartz instance 
'app-one')
         log.warn("The first app is going to crash NOW!");
         app.close();
 
@@ -67,7 +69,7 @@ public class SpringQuartzConsumerTwoAppsClusteredFailoverTest 
extends TestSuppor
 
         // wait long enough until the second app takes it over...
         Thread.sleep(20000);
-        // inside the logs one can then clearly see how the route of the 
second CamelContext gets started:
+        // inside the logs one can then clearly see how the route of the 
second app ('app-two') starts consuming:
         // 2013-09-28 19:50:43,900 [main           ] WARN  
ntTwoAppsClusteredFailoverTest - Crashed...
         // 2013-09-28 19:50:43,900 [main           ] WARN  
ntTwoAppsClusteredFailoverTest - Crashed...
         // 2013-09-28 19:50:43,900 [main           ] WARN  
ntTwoAppsClusteredFailoverTest - Crashed...
@@ -83,7 +85,7 @@ public class SpringQuartzConsumerTwoAppsClusteredFailoverTest 
extends TestSuppor
 
         mock2.assertIsSatisfied();
 
-        // stop the second app as we're already done
+        // close the second app as we're done now
         app2.close();
 
         // and as the last step shutdown the database...

http://git-wip-us.apache.org/repos/asf/camel/blob/bd06f388/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/SpringQuartzTwoAppsClusteredFailoverTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/SpringQuartzTwoAppsClusteredFailoverTest.java
 
b/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/SpringQuartzTwoAppsClusteredFailoverTest.java
index 8d9fc4f..c6cffad 100644
--- 
a/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/SpringQuartzTwoAppsClusteredFailoverTest.java
+++ 
b/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/SpringQuartzTwoAppsClusteredFailoverTest.java
@@ -37,11 +37,13 @@ public class SpringQuartzTwoAppsClusteredFailoverTest 
extends TestSupport {
         AbstractXmlApplicationContext db = new 
ClassPathXmlApplicationContext("org/apache/camel/routepolicy/quartz/SpringQuartzClusteredAppDatabase.xml");
         db.start();
 
-        // now launch the first clustered app
+        // now launch the first clustered app which will acquire the quartz
+        // database lock and become the master
         AbstractXmlApplicationContext app = new 
ClassPathXmlApplicationContext("org/apache/camel/routepolicy/quartz/SpringQuartzClusteredAppOne.xml");
         app.start();
 
-        // as well as the second one
+        // as well as the second one which will run in slave modus as it will
+        // not be able to acquire the same lock
         AbstractXmlApplicationContext app2 = new 
ClassPathXmlApplicationContext("org/apache/camel/routepolicy/quartz/SpringQuartzClusteredAppTwo.xml");
         app2.start();
 
@@ -58,7 +60,7 @@ public class SpringQuartzTwoAppsClusteredFailoverTest extends 
TestSupport {
 
         mock.assertIsSatisfied();
 
-        // now let's simulate a crash of the first app
+        // now let's simulate a crash of the first app (the quartz instance 
'app-one')
         log.warn("The first app is going to crash NOW!");
         app.close();
 
@@ -68,7 +70,7 @@ public class SpringQuartzTwoAppsClusteredFailoverTest extends 
TestSupport {
 
         // wait long enough until the second app takes it over...
         Thread.sleep(20000);
-        // inside the logs one can then clearly see how the route of the 
second CamelContext gets started:
+        // inside the logs one can then clearly see how the route of the 
second app ('app-two') gets started:
         // 2013-09-24 22:51:34,215 [main           ] WARN  
ersistentStoreClusteredAppTest - Crashed...
         // 2013-09-24 22:51:34,215 [main           ] WARN  
ersistentStoreClusteredAppTest - Crashed...
         // 2013-09-24 22:51:34,215 [main           ] WARN  
ersistentStoreClusteredAppTest - Crashed...
@@ -86,7 +88,7 @@ public class SpringQuartzTwoAppsClusteredFailoverTest extends 
TestSupport {
 
         mock2.assertIsSatisfied();
 
-        // stop the second app as we're already done
+        // close the second app as we're done now
         app2.close();
 
         // and as the last step shutdown the database...

Reply via email to