You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bv...@apache.org on 2013/10/12 22:52:14 UTC

git commit: Fixed JpaProducerConcurrentTest failing from time to time on the CI-Server.

Updated Branches:
  refs/heads/master 6dc0d840d -> f1ea032dc


Fixed JpaProducerConcurrentTest failing from time to time on the CI-Server.

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

Branch: refs/heads/master
Commit: f1ea032dcaf22a840b46a0e47e26fd6300712f47
Parents: 6dc0d84
Author: bvahdat <bv...@apache.org>
Authored: Sat Oct 12 22:52:04 2013 +0200
Committer: bvahdat <bv...@apache.org>
Committed: Sat Oct 12 22:52:04 2013 +0200

----------------------------------------------------------------------
 .../src/test/java/org/apache/camel/examples/MultiSteps.java      | 4 +++-
 .../src/test/java/org/apache/camel/examples/SendEmail.java       | 4 +++-
 .../apache/camel/processor/jpa/JpaProducerConcurrentTest.java    | 2 +-
 components/camel-jpa/src/test/resources/log4j.properties         | 2 +-
 4 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/f1ea032d/components/camel-jpa/src/test/java/org/apache/camel/examples/MultiSteps.java
----------------------------------------------------------------------
diff --git a/components/camel-jpa/src/test/java/org/apache/camel/examples/MultiSteps.java b/components/camel-jpa/src/test/java/org/apache/camel/examples/MultiSteps.java
index e872839..3e8fc51 100644
--- a/components/camel-jpa/src/test/java/org/apache/camel/examples/MultiSteps.java
+++ b/components/camel-jpa/src/test/java/org/apache/camel/examples/MultiSteps.java
@@ -50,7 +50,9 @@ public class MultiSteps {
 
     @Override
     public String toString() {
-        return "MultiSteps[id: " + getId() + " step: " + getStep() + " address: " + getAddress() + "]";
+        // TODO: don't make use of the id property here as it could potentially end up
+        // with a deadlock through the openjpa generated proxy object of this entity 
+        return "MultiSteps[step: " + getStep() + " address: " + getAddress() + "]";
     }
 
     @Id

http://git-wip-us.apache.org/repos/asf/camel/blob/f1ea032d/components/camel-jpa/src/test/java/org/apache/camel/examples/SendEmail.java
----------------------------------------------------------------------
diff --git a/components/camel-jpa/src/test/java/org/apache/camel/examples/SendEmail.java b/components/camel-jpa/src/test/java/org/apache/camel/examples/SendEmail.java
index 408d68e..78bc0d7 100644
--- a/components/camel-jpa/src/test/java/org/apache/camel/examples/SendEmail.java
+++ b/components/camel-jpa/src/test/java/org/apache/camel/examples/SendEmail.java
@@ -44,7 +44,9 @@ public class SendEmail {
 
     @Override
     public String toString() {
-        return "SendEmail[id: " + getId() + " address: " + getAddress() + "]";
+        // TODO: don't make use of the id property here as it could potentially end up
+        // with a deadlock through the openjpa generated proxy object of this entity 
+        return "SendEmail[address: " + getAddress() + "]";
     }
 
     @Id

http://git-wip-us.apache.org/repos/asf/camel/blob/f1ea032d/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaProducerConcurrentTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaProducerConcurrentTest.java b/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaProducerConcurrentTest.java
index b6c16e0..52b31d3 100644
--- a/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaProducerConcurrentTest.java
+++ b/components/camel-jpa/src/test/java/org/apache/camel/processor/jpa/JpaProducerConcurrentTest.java
@@ -71,7 +71,7 @@ public class JpaProducerConcurrentTest extends AbstractJpaTest {
         for (Future<SendEmail> future : responses.values()) {
             SendEmail sendMail = future.get();
             assertNotNull(sendMail);
-            log.info("Got the managed entity {}", sendMail);
+            log.info("Got the managed entity {} with the id {}", sendMail, sendMail.getId());
         }
 
         // assert in the database

http://git-wip-us.apache.org/repos/asf/camel/blob/f1ea032d/components/camel-jpa/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/components/camel-jpa/src/test/resources/log4j.properties b/components/camel-jpa/src/test/resources/log4j.properties
index a59802d..926f81c 100644
--- a/components/camel-jpa/src/test/resources/log4j.properties
+++ b/components/camel-jpa/src/test/resources/log4j.properties
@@ -18,7 +18,7 @@
 #
 # The logging properties used for eclipse testing, We want to see debug output on the console.
 #
-log4j.rootLogger=DEBUG, out
+log4j.rootLogger=INFO, file
 
 #log4j.logger.org.apache.camel=DEBUG
 #log4j.logger.org.springframework=WARN