[jboss-svn-commits] JBL Code SVN: r5586 - labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/connection
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Aug 7 20:52:09 EDT 2006
Author: mohit309
Date: 2006-08-07 20:52:09 -0400 (Mon, 07 Aug 2006)
New Revision: 5586
Modified:
labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/connection/AbandonedConnectionFuncTest.java
Log:
Modified test case to take less time.
Modified: labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/connection/AbandonedConnectionFuncTest.java
===================================================================
--- labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/connection/AbandonedConnectionFuncTest.java 2006-08-08 00:41:05 UTC (rev 5585)
+++ labs/jbossesb/trunk/product/core/common/tests/src/org/jboss/soa/esb/connection/AbandonedConnectionFuncTest.java 2006-08-08 00:52:09 UTC (rev 5586)
@@ -33,7 +33,9 @@
import org.jboss.soa.esb.common.tests.BaseTest;
/**
- * TODO
+ * This class tests for abandoned connections. Abandoned connections are connections which are requested from the pool, never used and
+ * never returned back to the pool by calling connection#close() method. This test gets a connection from pool and then sleeps for a elongated
+ * period of time and then fires methods on connection which is cleaned up the pool. This leads to SQLException.
* User: MohitK
* Date: Aug 3, 2006
*/
@@ -47,7 +49,8 @@
properties.put(ConnectionProperties.CONNECTION_URL, SYSTEM_PARAMETERS.get(DB_URL));
properties.put(ConnectionProperties.USERNAME, SYSTEM_PARAMETERS.get(DB_USERNAME));
properties.put(ConnectionProperties.PASSWORD, SYSTEM_PARAMETERS.get(DB_PASSWORD));
- properties.put(ConnectionProperties.ABANDONED_CONNECTION_CHECK_INTERVAL, "30000");
+ properties.put(ConnectionProperties.ABANDONED_CONNECTION_TIMEOUT, "2000");
+ properties.put(ConnectionProperties.ABANDONED_CONNECTION_CHECK_INTERVAL, "3000");
}
@@ -59,9 +62,8 @@
Connection con3 = null;
try {
con1 = ds.getConnection();
- con2 = ds.getConnection();
try {
- Thread.sleep(40000);
+ Thread.sleep(4000);
} catch (InterruptedException e) {
//Do nothing
}
More information about the jboss-svn-commits
mailing list