tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fha...@apache.org
Subject svn commit: r708717 - in /tomcat/trunk/modules/jdbc-pool: build.xml test/org/apache/tomcat/jdbc/test/TestGCClose.java
Date Tue, 28 Oct 2008 23:12:39 GMT
Author: fhanik
Date: Tue Oct 28 16:12:39 2008
New Revision: 708717

URL: http://svn.apache.org/viewvc?rev=708717&view=rev
Log:
add test target

Modified:
    tomcat/trunk/modules/jdbc-pool/build.xml
    tomcat/trunk/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/TestGCClose.java

Modified: tomcat/trunk/modules/jdbc-pool/build.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/build.xml?rev=708717&r1=708716&r2=708717&view=diff
==============================================================================
--- tomcat/trunk/modules/jdbc-pool/build.xml (original)
+++ tomcat/trunk/modules/jdbc-pool/build.xml Tue Oct 28 16:12:39 2008
@@ -1,170 +1,200 @@
-<?xml version="1.0"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-<project name="Tomcat Trunk" default="conpool" basedir="../..">
-
-
-  <!-- ===================== Initialize Property Values =================== -->
-
-  <!-- See "build.properties.sample" in the top level directory for all     -->
-  <!-- property values you must customize for successful building!!!        -->
-  <property file="${user.home}/build.properties"/>
-  <property file="${basedir}/build.properties"/>
-
-  <property file="${basedir}/build.properties.default"/>
-
-  <!-- Project Properties -->
-  <property name="name"                  value="Apache Tomcat" />
-  <property name="year"                  value="2007" />
-  <property name="version.major"         value="6" />
-  <property name="version.minor"         value="0" />
-  <property name="version.build"         value="0" />
-  <property name="version.patch"         value="0" />
-  <property name="version"               value="6.0.0-dev" />
-  <property name="version.number"        value="${version.major}.${version.minor}.${version.build}.${version.patch}"
/>
-
-  <property name="project"               value="apache-tomcat" />
-  <property name="final.name"            value="${project}-${version}" />
-  <property name="final-src.name"        value="${project}-${version}-src" />
-
-  <!-- Build Defaults -->
-  <property name="tomcat.build"      value="${basedir}/output/build"/>
-  <property name="tomcat.classes"    value="${basedir}/output/classes"/>
-  <property name="tomcat.dist"       value="${basedir}/output/dist"/>
-  <property name="tomcat.extras"     value="${basedir}/output/extras"/>
-  <property name="tomcat.deployer"   value="${basedir}/output/deployer"/>
-  <property name="tomcat.release"    value="${basedir}/output/release"/>
-  <property name="test.failonerror"  value="true"/>
-  <property name="test.runner"       value="junit.textui.TestRunner"/>
-
-  <!-- Can't be lower - jsp uses templates -->
-  <property name="compile.source" value="1.5"/>
-
-  <!-- JAR artifacts -->
-  <property name="bootstrap.jar" value="${tomcat.build}/bin/bootstrap.jar"/>
-
-  <property name="annotations-api.jar" value="${tomcat.build}/lib/annotations-api.jar"/>
-  <property name="servlet-api.jar" value="${tomcat.build}/lib/servlet-api.jar"/>
-  <property name="jsp-api.jar" value="${tomcat.build}/lib/jsp-api.jar"/>
-  <property name="el-api.jar" value="${tomcat.build}/lib/el-api.jar"/>
-  <property name="catalina.jar" value="${tomcat.build}/lib/catalina.jar"/>
-  <property name="catalina-ant.jar" value="${tomcat.build}/lib/catalina-ant.jar"/>
-  <property name="tomcat-coyote.jar" value="${tomcat.build}/lib/tomcat-coyote.jar"/>
-
-  <property name="jasper.jar" value="${tomcat.build}/lib/jasper.jar"/>
-  <property name="jasper-el.jar" value="${tomcat.build}/lib/jasper-el.jar"/>
-
-  <property name="tomcat-dbcp.home" value="${base.path}/tomcat6-deps/dbcp" />
-  <property name="jasper-jdt.home" value="${base.path}/tomcat6-deps/jdt" />
-  <property name="tomcat-dbcp.jar" value="${tomcat-dbcp.home}/tomcat-dbcp.jar"/>
-  <property name="jasper-jdt.jar" value="${jasper-jdt.home}/jasper-jdt.jar"/>
-
-  <property name="tomcat-juli.jar" value="${tomcat.extras}/tomcat-juli.jar"/>
-  <property name="tomcat-juli-adapters.jar" value="${tomcat.extras}/tomcat-juli-adapters.jar"/>
-  <property name="catalina-ws.jar" value="${tomcat.extras}/catalina-ws.jar"/>
-
-  <property name="cometd-api.jar" value="${tomcat.extras}/cometd-api.jar"/>
-  <property name="tomcat-bayeux.jar" value="${tomcat.extras}/tomcat-bayeux.jar"/>
-  <property name="cometd.war" value="${tomcat.extras}/cometd.war"/>
-  <property name="tomcat-bayeux-samples.jar" value="${tomcat.extras}/tomcat-bayeux-samples.jar"/>
-
-  <property name="tomcat-jdbc.jar" value="${tomcat.extras}/tomcat-jdbc.jar"/>
-
-  <property name="catalina-jmx-remote.jar" value="${tomcat.extras}/catalina-jmx-remote.jar"/>
-	
-  <!-- Classpath -->
-  <path id="tomcat.classpath">
-    <pathelement location="${tomcat.classes}"/>
-  </path>
-
-  <target name="prepare">
-    <mkdir dir="${tomcat.extras}"/>
-  </target>
-
-  <target name="conpool">
-    <mkdir dir="${tomcat.extras}"/>
-    <path id="tomcat.jdbc.classpath">
-      <pathelement path="${tomcat.classpath}"/>
-    </path>
-
-    <!-- compile org.apache.tomcat.jdbc-->
-    <javac srcdir="${basedir}/modules/jdbc-pool/java" destdir="${tomcat.classes}"
-           debug="${compile.debug}"
-           deprecation="${compile.deprecation}"
-           source="${compile.source}"
-           optimize="${compile.optimize}">
-      <classpath refid="tomcat.jdbc.classpath"/>
-      <include name="org/apache/tomcat/jdbc/**" />
-    </javac>
-    
-    <!-- connection pool JAR File -->
-    <jar jarfile="${tomcat-jdbc.jar}">
-      <fileset dir="${tomcat.classes}">
-        <include name="org/apache/tomcat/jdbc/**" />
-      </fileset>
-    </jar>
-    <!-- create checksums -->
-    <checksum file="${tomcat-jdbc.jar}" forceOverwrite="yes" fileext=".md5" />
-  </target>
-
-  <target name="clean"> 
-      <delete file="${tomcat-jdbc.jar}"/>
-      <delete file="${tomcat-jdbc.jar}.md5"/>
-      <delete includeemptydirs="true">
-          <fileset dir="${tomcat.classes}">
-            <include name="org/apache/tomcat/jdbc/**"/>
-          </fileset>
-      </delete>
-  </target>
-	
-  <!-- Download and dependency building -->
-  <target name="proxyflags">
-    <!-- check proxy parameters. -->
-    <condition property="useproxy">
-      <equals arg1="${proxy.use}" arg2="on" />
-    </condition>
-  </target>
-
-  <target name="setproxy" depends="proxyflags" if="useproxy">
-    <taskdef name="setproxy"
-            classname="org.apache.tools.ant.taskdefs.optional.net.SetProxy" />
-    <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"
-              proxyuser="${proxy.user}" proxypassword="${proxy.password}" />
-    <echo message="Using ${proxy.host}:${proxy.port} to download ${sourcefile}"/>
-  </target>
-
-  <target name="testexist">
-    <echo message="Testing  for ${destfile}"/>
-    <available file="${destfile}" property="exist"/>
-  </target>
-
-  <target name="downloadfile" unless="exist" depends="setproxy,testexist">
-    <!-- Download extract the file -->
-    <mkdir dir="${destdir}" />
-    <get src="${sourcefile}" dest="${destfile}" />
-  </target>
-	
-  <target name="downloadgz" unless="exist" depends="setproxy,testexist">
-    <!-- Download and extract the package -->
-    <get src="${sourcefile}" dest="${base.path}/file.tar.gz" />
-    <gunzip src="${base.path}/file.tar.gz" dest="${base.path}/file.tar"/>
-    <untar src="${base.path}/file.tar" dest="${base.path}"/>
-    <delete file="${base.path}/file.tar"/>
-    <delete file="${base.path}/file.tar.gz"/>
-  </target>
-
-</project>
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<project name="Tomcat Trunk" default="build" basedir="../..">
+
+
+  <!-- ===================== Initialize Property Values =================== -->
+
+  <!-- See "build.properties.sample" in the top level directory for all     -->
+  <!-- property values you must customize for successful building!!!        -->
+  <property file="${user.home}/build.properties"/>
+  <property file="${basedir}/build.properties"/>
+
+  <property file="${basedir}/build.properties.default"/>
+
+  <!-- Project Properties -->
+  <property name="name"                  value="Apache Tomcat" />
+  <property name="year"                  value="2007" />
+  <property name="version.major"         value="6" />
+  <property name="version.minor"         value="0" />
+  <property name="version.build"         value="0" />
+  <property name="version.patch"         value="0" />
+  <property name="version"               value="6.0.0-dev" />
+  <property name="version.number"        value="${version.major}.${version.minor}.${version.build}.${version.patch}"
/>
+
+  <property name="project"               value="apache-tomcat" />
+  <property name="final.name"            value="${project}-${version}" />
+  <property name="final-src.name"        value="${project}-${version}-src" />
+
+  <!-- Build Defaults -->
+  <property name="tomcat.build"      value="${basedir}/output/build"/>
+  <property name="tomcat.classes"    value="${basedir}/output/classes"/>
+  <property name="tomcat.dist"       value="${basedir}/output/dist"/>
+  <property name="tomcat.extras"     value="${basedir}/output/extras"/>
+  <property name="tomcat.deployer"   value="${basedir}/output/deployer"/>
+  <property name="tomcat.release"    value="${basedir}/output/release"/>
+  <property name="test.failonerror"  value="true"/>
+  <property name="test.runner"       value="junit.textui.TestRunner"/>
+
+  <!-- Can't be lower - jsp uses templates -->
+  <property name="compile.source" value="1.5"/>
+
+  <!-- JAR artifacts -->
+  <property name="bootstrap.jar" value="${tomcat.build}/bin/bootstrap.jar"/>
+
+  <property name="annotations-api.jar" value="${tomcat.build}/lib/annotations-api.jar"/>
+  <property name="servlet-api.jar" value="${tomcat.build}/lib/servlet-api.jar"/>
+  <property name="jsp-api.jar" value="${tomcat.build}/lib/jsp-api.jar"/>
+  <property name="el-api.jar" value="${tomcat.build}/lib/el-api.jar"/>
+  <property name="catalina.jar" value="${tomcat.build}/lib/catalina.jar"/>
+  <property name="catalina-ant.jar" value="${tomcat.build}/lib/catalina-ant.jar"/>
+  <property name="tomcat-coyote.jar" value="${tomcat.build}/lib/tomcat-coyote.jar"/>
+
+  <property name="jasper.jar" value="${tomcat.build}/lib/jasper.jar"/>
+  <property name="jasper-el.jar" value="${tomcat.build}/lib/jasper-el.jar"/>
+
+  <property name="tomcat-dbcp.home" value="${base.path}/tomcat6-deps/dbcp" />
+  <property name="jasper-jdt.home" value="${base.path}/tomcat6-deps/jdt" />
+  <property name="tomcat-dbcp.jar" value="${tomcat-dbcp.home}/tomcat-dbcp.jar"/>
+  <property name="jasper-jdt.jar" value="${jasper-jdt.home}/jasper-jdt.jar"/>
+
+  <property name="tomcat-juli.jar" value="${tomcat.extras}/tomcat-juli.jar"/>
+  <property name="tomcat-juli-adapters.jar" value="${tomcat.extras}/tomcat-juli-adapters.jar"/>
+  <property name="catalina-ws.jar" value="${tomcat.extras}/catalina-ws.jar"/>
+
+  <property name="cometd-api.jar" value="${tomcat.extras}/cometd-api.jar"/>
+  <property name="tomcat-bayeux.jar" value="${tomcat.extras}/tomcat-bayeux.jar"/>
+  <property name="cometd.war" value="${tomcat.extras}/cometd.war"/>
+  <property name="tomcat-bayeux-samples.jar" value="${tomcat.extras}/tomcat-bayeux-samples.jar"/>
+
+  <property name="tomcat-jdbc.jar" value="${tomcat.extras}/tomcat-jdbc.jar"/>
+
+  <property name="catalina-jmx-remote.jar" value="${tomcat.extras}/catalina-jmx-remote.jar"/>
+	
+  <!-- Classpath -->
+  <path id="tomcat.classpath">
+    <pathelement location="${tomcat.classes}"/>
+  </path>
+	
+  <path id="test.classpath">
+  	<pathelement location="${tomcat-jdbc.jar}"/>
+  	<pathelement location="${tomcat.classes}"/>
+    <fileset dir="${base.path}">
+      <include name="**/tomcat-dbcp.jar"/>
+      <include name="**/junit.jar"/>
+      <include name="**/mysql-connector-java-5.0.7-bin.jar"/>
+    </fileset>
+  </path>
+
+
+  <target name="prepare">
+    <mkdir dir="${tomcat.extras}"/>
+  </target>
+
+  <target name="build">
+    <mkdir dir="${tomcat.extras}"/>
+    <path id="tomcat.jdbc.classpath">
+      <pathelement path="${tomcat.classpath}"/>
+    </path>
+
+    <!-- compile org.apache.tomcat.jdbc-->
+    <javac srcdir="${basedir}/modules/jdbc-pool/java" destdir="${tomcat.classes}"
+           debug="${compile.debug}"
+           deprecation="${compile.deprecation}"
+           source="${compile.source}"
+           optimize="${compile.optimize}">
+      <classpath refid="tomcat.jdbc.classpath"/>
+      <include name="org/apache/tomcat/jdbc/**" />
+    </javac>
+    
+    <!-- connection pool JAR File -->
+    <jar jarfile="${tomcat-jdbc.jar}">
+      <fileset dir="${tomcat.classes}">
+        <include name="org/apache/tomcat/jdbc/**" />
+      </fileset>
+    </jar>
+    <!-- create checksums -->
+    <checksum file="${tomcat-jdbc.jar}" forceOverwrite="yes" fileext=".md5" />
+
+  
+  </target>
+
+  <target name="clean"> 
+      <delete file="${tomcat-jdbc.jar}"/>
+      <delete file="${tomcat-jdbc.jar}.md5"/>
+      <delete includeemptydirs="true">
+          <fileset dir="${tomcat.classes}">
+            <include name="org/apache/tomcat/jdbc/**"/>
+          </fileset>
+      </delete>
+  </target>
+	
+  <target name="test" depends="clean,build">
+
+    <!-- compile org.apache.tomcat.jdbc-->
+    <javac srcdir="${basedir}/modules/jdbc-pool/test" destdir="${tomcat.classes}"
+           debug="${compile.debug}"
+           deprecation="${compile.deprecation}"
+           source="${compile.source}"
+           optimize="${compile.optimize}">
+      <classpath refid="test.classpath"/>
+      <include name="org/apache/tomcat/jdbc/**" />
+    </javac>
+  	
+  	<java classname="org.junit.runner.JUnitCore" classpathref="test.classpath" fork="false">
+      <arg line="org.apache.tomcat.jdbc.test.CheckOutThreadTest" />
+    </java>
+  </target>	
+	
+  <!-- Download and dependency building -->
+  <target name="proxyflags">
+    <!-- check proxy parameters. -->
+    <condition property="useproxy">
+      <equals arg1="${proxy.use}" arg2="on" />
+    </condition>
+  </target>
+
+  <target name="setproxy" depends="proxyflags" if="useproxy">
+    <taskdef name="setproxy"
+            classname="org.apache.tools.ant.taskdefs.optional.net.SetProxy" />
+    <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"
+              proxyuser="${proxy.user}" proxypassword="${proxy.password}" />
+    <echo message="Using ${proxy.host}:${proxy.port} to download ${sourcefile}"/>
+  </target>
+
+  <target name="testexist">
+    <echo message="Testing  for ${destfile}"/>
+    <available file="${destfile}" property="exist"/>
+  </target>
+
+  <target name="downloadfile" unless="exist" depends="setproxy,testexist">
+    <!-- Download extract the file -->
+    <mkdir dir="${destdir}" />
+    <get src="${sourcefile}" dest="${destfile}" />
+  </target>
+	
+  <target name="downloadgz" unless="exist" depends="setproxy,testexist">
+    <!-- Download and extract the package -->
+    <get src="${sourcefile}" dest="${base.path}/file.tar.gz" />
+    <gunzip src="${base.path}/file.tar.gz" dest="${base.path}/file.tar"/>
+    <untar src="${base.path}/file.tar" dest="${base.path}"/>
+    <delete file="${base.path}/file.tar"/>
+    <delete file="${base.path}/file.tar.gz"/>
+  </target>
+
+</project>

Modified: tomcat/trunk/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/TestGCClose.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/TestGCClose.java?rev=708717&r1=708716&r2=708717&view=diff
==============================================================================
--- tomcat/trunk/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/TestGCClose.java (original)
+++ tomcat/trunk/modules/jdbc-pool/test/org/apache/tomcat/jdbc/test/TestGCClose.java Tue Oct
28 16:12:39 2008
@@ -30,6 +30,6 @@
         datasource.getConnection();
         System.out.println("Got a connection, but didn't return it");
         tearDown();
-        Thread.sleep(10000);
+        Thread.sleep(20000);
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message