Author: fhanik
Date: Tue Dec 2 09:11:38 2008
New Revision: 722528
URL: http://svn.apache.org/viewvc?rev=722528&view=rev
Log:
remove some not needed test, add compile version
Modified:
tomcat/trunk/modules/jdbc-pool/build.xml
tomcat/trunk/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/CheckOutThreadTest.java
Modified: tomcat/trunk/modules/jdbc-pool/build.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/build.xml?rev=722528&r1=722527&r2=722528&view=diff
==============================================================================
--- tomcat/trunk/modules/jdbc-pool/build.xml (original)
+++ tomcat/trunk/modules/jdbc-pool/build.xml Tue Dec 2 09:11:38 2008
@@ -91,6 +91,7 @@
debug="${compile.debug}"
deprecation="${compile.deprecation}"
source="${compile.source}"
+ target="${compile.source}"
optimize="${compile.optimize}">
<classpath refid="tomcat.jdbc.classpath"/>
<include name="org/apache/tomcat/jdbc/**" />
@@ -131,6 +132,7 @@
debug="${compile.debug}"
deprecation="${compile.deprecation}"
source="${compile.source}"
+ target="${compile.source}"
optimize="${compile.optimize}">
<classpath refid="test.classpath"/>
<include name="org/apache/tomcat/jdbc/**" />
Modified:
tomcat/trunk/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/CheckOutThreadTest.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/CheckOutThreadTest.java?rev=722528&r1=722527&r2=722528&view=diff
==============================================================================
---
tomcat/trunk/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/CheckOutThreadTest.java
(original)
+++
tomcat/trunk/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/CheckOutThreadTest.java
Tue Dec 2 09:11:38 2008
@@ -227,96 +227,6 @@
tearDown();
}
- public void testDBCPThreads10Connections10WithQuery() throws Exception {
- init();
- this.datasource.getPoolProperties().setMaxActive(10);
- this.datasource.getPoolProperties().setTestOnBorrow(false);
- this.threadcount = 10;
- this.transferProperties();
- this.tDatasource.getConnection().close();
- latch = new CountDownLatch(threadcount);
- long start = System.currentTimeMillis();
- for (int i=0; i<threadcount; i++) {
- TestThread t = new TestThread();
- t.setName("tomcat-dbcp-"+i);
- t.d = this.tDatasource;
- t.query = "select * from user";
- t.start();
- }
- latch.await();
- long delta = System.currentTimeMillis() - start;
- System.out.println("[testDBCPThreads10Connections10WithQuery]Test
complete:"+delta+" ms. Iterations:"+(threadcount*this.iterations));
- tearDown();
- }
-
- public void testPoolThreads10Connections10WithQuery() throws Exception {
- init();
- this.datasource.getPoolProperties().setMaxActive(10);
- this.datasource.getPoolProperties().setTestOnBorrow(false);
- this.threadcount = 10;
- this.transferProperties();
- this.datasource.getConnection().close();
- latch = new CountDownLatch(threadcount);
- long start = System.currentTimeMillis();
- for (int i=0; i<threadcount; i++) {
- TestThread t = new TestThread();
- t.setName("tomcat-pool-"+i);
- t.d = DataSourceFactory.getDataSource(this.datasource);
- t.query = "select * from user";
- t.start();
- }
- latch.await();
- long delta = System.currentTimeMillis() - start;
- System.out.println("[testPoolThreads10Connections10WithQuery]Test
complete:"+delta+" ms. Iterations:"+(threadcount*this.iterations));
- tearDown();
- }
-
- public void testDBCPThreads10Connections10WithValidateWithQuery() throws
Exception {
- init();
- this.datasource.getPoolProperties().setMaxActive(10);
- this.datasource.getPoolProperties().setTestOnBorrow(true);
- this.datasource.getPoolProperties().setValidationQuery("SELECT 1");
- this.threadcount = 10;
- this.transferProperties();
- this.tDatasource.getConnection().close();
- latch = new CountDownLatch(threadcount);
- long start = System.currentTimeMillis();
- for (int i=0; i<threadcount; i++) {
- TestThread t = new TestThread();
- t.setName("tomcat-dbcp-"+i);
- t.d = this.tDatasource;
- t.query = "select * from user";
- t.start();
- }
- latch.await();
- long delta = System.currentTimeMillis() - start;
-
System.out.println("[testDBCPThreads10Connections10WithValidateWithQuery]Test
complete:"+delta+" ms. Iterations:"+(threadcount*this.iterations));
- tearDown();
- }
-
- public void testPoolThreads10Connections10WithValidateWithQuery() throws
Exception {
- init();
- this.datasource.getPoolProperties().setMaxActive(10);
- this.datasource.getPoolProperties().setTestOnBorrow(true);
- this.datasource.getPoolProperties().setValidationQuery("SELECT 1");
- this.threadcount = 10;
- this.transferProperties();
- this.datasource.getConnection().close();
- latch = new CountDownLatch(threadcount);
- long start = System.currentTimeMillis();
- for (int i=0; i<threadcount; i++) {
- TestThread t = new TestThread();
- t.setName("tomcat-pool-"+i);
- t.d = DataSourceFactory.getDataSource(this.datasource);
- t.query = "select * from user";
- t.start();
- }
- latch.await();
- long delta = System.currentTimeMillis() - start;
-
System.out.println("[testPoolThreads10Connections10WithValidateWithQuery]Test
complete:"+delta+" ms. Iterations:"+(threadcount*this.iterations));
- tearDown();
- }
-
public class TestThread extends Thread {
protected DataSource d;
protected String query = null;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]