Fixed potential test error

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

Branch: refs/heads/camel-2.16.x
Commit: 4e3ff1913067535ee695fa1428eeb34035d44ae2
Parents: 0399fd4
Author: Claus Ibsen <davscl...@apache.org>
Authored: Sun Nov 22 09:25:14 2015 +0100
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Sun Nov 22 09:25:35 2015 +0100

----------------------------------------------------------------------
 .../org/apache/camel/component/jpa/JpaWithNamedQueryTest.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/4e3ff191/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaWithNamedQueryTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaWithNamedQueryTest.java
 
b/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaWithNamedQueryTest.java
index 6a23967..e91dac6 100644
--- 
a/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaWithNamedQueryTest.java
+++ 
b/components/camel-jpa/src/test/java/org/apache/camel/component/jpa/JpaWithNamedQueryTest.java
@@ -107,7 +107,8 @@ public class JpaWithNamedQueryTest extends Assert {
 
         // lets now test that the database is updated
         // we need to sleep as we will be invoked from inside the transaction!
-        Thread.sleep(1000);
+        // org.apache.openjpa.persistence.InvalidStateException: This 
operation cannot be performed while a Transaction is active.
+        Thread.sleep(2000);
 
         transactionTemplate.execute(new TransactionCallback<Object>() {
             public Object doInTransaction(TransactionStatus status) {

Reply via email to