db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrn...@apache.org
Subject svn commit: r552621 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/XATransactionTest.java
Date Mon, 02 Jul 2007 23:02:46 GMT
Author: myrnavl
Date: Mon Jul  2 16:02:43 2007
New Revision: 552621

URL: http://svn.apache.org/viewvc?view=rev&rev=552621
Log:
DERBY-2871; modifying timeout in test XATransactionTest.
  Patch contributed by Julius Stroffek

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/XATransactionTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/XATransactionTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/XATransactionTest.java?view=diff&rev=552621&r1=552620&r2=552621
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/XATransactionTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/XATransactionTest.java
Mon Jul  2 16:02:43 2007
@@ -190,7 +190,21 @@
             conn = xaConn.getConnection();
 
             Xid xid = createXid(123, i);
-            xaRes.setTransactionTimeout(5);
+
+            if (i % timeoutCommitEveryStatement == 0) {
+                // Setup the higher value for the transaction timeout
+                // if the transaction is going to be committed
+                // just to be sure that it would not be rolled back
+                // before commit due to a garbage collection
+                // in progress, etc.
+                xaRes.setTransactionTimeout(60);
+            } else {
+                // We will set the transaction timeout value low
+                // for transactions going to be rolled back to keep
+                // the number of pending transactions low
+                xaRes.setTransactionTimeout(8);
+            }
+
             xaRes.start(xid, XAResource.TMNOFLAGS);
 
             stm = conn.createStatement();



Mime
View raw message