remove some not needed test, add compile version
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 2 Dec 2008 17:11:38 +0000 (17:11 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 2 Dec 2008 17:11:38 +0000 (17:11 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@722528 13f79535-47bb-0310-9956-ffa450edef68

modules/jdbc-pool/build.xml
modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/CheckOutThreadTest.java

index 6edb62e..6bd3266 100644 (file)
@@ -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/**" />
            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/**" />
index 93ab3e9..8b35c4e 100644 (file)
@@ -227,96 +227,6 @@ public class CheckOutThreadTest extends DefaultTestCase {
         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;