From derby-commits-return-7899-apmail-db-derby-commits-archive=db.apache.org@db.apache.org Mon Jul 02 23:03:08 2007 Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 7637 invoked from network); 2 Jul 2007 23:03:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Jul 2007 23:03:07 -0000 Received: (qmail 54240 invoked by uid 500); 2 Jul 2007 23:03:10 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 54217 invoked by uid 500); 2 Jul 2007 23:03:10 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 54206 invoked by uid 99); 2 Jul 2007 23:03:10 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jul 2007 16:03:10 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jul 2007 16:03:06 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id BFED21A981A; Mon, 2 Jul 2007 16:02:46 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: derby-commits@db.apache.org From: myrnavl@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070702230246.BFED21A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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();