camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bvah...@apache.org
Subject git commit: Polished the comments a bit.
Date Mon, 30 Sep 2013 14:51:28 GMT
Updated Branches:
  refs/heads/master c55c104c3 -> b0f7931c4


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/b0f7931c
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b0f7931c
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b0f7931c

Branch: refs/heads/master
Commit: b0f7931c4d020c6c21f409dddd9bc9fb67b5650d
Parents: c55c104
Author: Babak Vahdat <bvahdat@apache.org>
Authored: Mon Sep 30 16:51:18 2013 +0200
Committer: Babak Vahdat <bvahdat@apache.org>
Committed: Mon Sep 30 16:51:18 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/b0f7931c/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/SpringQuartzConsumerTwoAppsClusteredFailoverTest.java
----------------------------------------------------------------------
diff --git a/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/SpringQuartzConsumerTwoAppsClusteredFailoverTest.java
b/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/SpringQuartzConsumerTwoAppsClusteredFailoverTest.java
index 2ccb4aa..eeacaff 100644
--- a/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/SpringQuartzConsumerTwoAppsClusteredFailoverTest.java
+++ b/components/camel-quartz2/src/test/java/org/apache/camel/component/quartz2/SpringQuartzConsumerTwoAppsClusteredFailoverTest.java
@@ -38,11 +38,13 @@ public class SpringQuartzConsumerTwoAppsClusteredFailoverTest extends
TestSuppor
         AbstractXmlApplicationContext db = new ClassPathXmlApplicationContext("org/apache/camel/component/quartz2/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/quartz2/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/quartz2/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-30 11:22:20,349 [main           ] WARN  erTwoAppsClusteredFailoverTest
- Crashed...
         // 2013-09-30 11:22:20,349 [main           ] WARN  erTwoAppsClusteredFailoverTest
- Crashed...
         // 2013-09-30 11:22:20,349 [main           ] WARN  erTwoAppsClusteredFailoverTest
- 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/b0f7931c/components/camel-quartz2/src/test/java/org/apache/camel/routepolicy/quartz2/SpringQuartzTwoAppsClusteredFailoverTest.java
----------------------------------------------------------------------
diff --git a/components/camel-quartz2/src/test/java/org/apache/camel/routepolicy/quartz2/SpringQuartzTwoAppsClusteredFailoverTest.java
b/components/camel-quartz2/src/test/java/org/apache/camel/routepolicy/quartz2/SpringQuartzTwoAppsClusteredFailoverTest.java
index cccc3ff..35fd710 100644
--- a/components/camel-quartz2/src/test/java/org/apache/camel/routepolicy/quartz2/SpringQuartzTwoAppsClusteredFailoverTest.java
+++ b/components/camel-quartz2/src/test/java/org/apache/camel/routepolicy/quartz2/SpringQuartzTwoAppsClusteredFailoverTest.java
@@ -37,11 +37,13 @@ public class SpringQuartzTwoAppsClusteredFailoverTest extends TestSupport
{
         AbstractXmlApplicationContext db = new ClassPathXmlApplicationContext("org/apache/camel/routepolicy/quartz2/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/quartz2/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/quartz2/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-29 08:15:17,038 [main           ] WARN  tzTwoAppsClusteredFailoverTest:65
  - Crashed...
         // 2013-09-29 08:15:17,038 [main           ] WARN  tzTwoAppsClusteredFailoverTest:66
  - Crashed...
         // 2013-09-29 08:15:17,038 [main           ] WARN  tzTwoAppsClusteredFailoverTest:67
  - 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...


Mime
View raw message