avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From je...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/datasource/src/test/org/apache/avalon/excalibur/datasource/test DataSourceJdbcTestCase.xtest
Date Sat, 13 Apr 2002 08:30:06 GMT
jefft       02/04/13 01:30:06

  Modified:    .        dependencies.txt
               all      ant.properties.sample build.xml default.properties
               datasource ant.properties.sample build.xml
                        default.properties
               datasource/src/test/org/apache/avalon/excalibur/datasource/test
                        DataSourceJdbcTestCase.xtest
  Removed:     all/src/test/org/apache/avalon/excalibur/datasource/test
                        DataSourceJdbcTestCase.java
                        DataSourceJdbcTestCase.xtest
  Log:
  Get the datasource unit tests separated from all/
  
  Revision  Changes    Path
  1.13      +2 -2      jakarta-avalon-excalibur/dependencies.txt
  
  Index: dependencies.txt
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/dependencies.txt,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- dependencies.txt	13 Apr 2002 05:50:14 -0000	1.12
  +++ dependencies.txt	13 Apr 2002 08:30:05 -0000	1.13
  @@ -20,9 +20,9 @@
   * altrmi -> framework
   * util -> framework
   * baxter -> jmxri.jar
  -* datasource -> pool, logkit, framework
  +* datasource -> pool, logkit, framework [Unit tests: junit, testcase, component, logger]
   * event -> collections, concurrent, core, framework, event, util, thread, threadcontext,
pool
  -* all -> collections, concurrent, instrument, event, component, pool, logkit, logger,
(recursive on fortress, commented out) 
  +* all -> framework, collections, concurrent, instrument, event, component, pool, logkit,
logger, datasource, (recursive on fortress, commented out) [Unit tests: junit, testcase]
   * component -> logkit, framework, collections, logger, pool [Unit tests: junit, util,
testcase, instrument (runtime)]
   * fortress -> instrument, instrument-manager, framework, testcase, event (recursive
on mpool in scratchpad), component (test class), logger, util
   instrument-client -> altrmi-client-impl
  
  
  
  1.12      +2 -13     jakarta-avalon-excalibur/all/ant.properties.sample
  
  Index: ant.properties.sample
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/all/ant.properties.sample,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ant.properties.sample	8 Apr 2002 10:32:06 -0000	1.11
  +++ ant.properties.sample	13 Apr 2002 08:30:05 -0000	1.12
  @@ -11,7 +11,7 @@
   # It is overridden by ../ant.properties and ~/build.properties
   # It overrides all default.properties files.
   #
  -# $Id: ant.properties.sample,v 1.11 2002/04/08 10:32:06 jefft Exp $
  +# $Id: ant.properties.sample,v 1.12 2002/04/13 08:30:05 jefft Exp $
   # -----------------------------------------------------------------------------
   # --------------------------------------------------
   #                REQUIRED LIBRARIES
  @@ -105,15 +105,4 @@
   # Enable Performance tests.
   #test.profile=true
   
  -# Enable JDBC tests.  Configure for your database.
  -# WARNING - Tests may modify and/or destroy tables and data in the specified database.
  -#test.jdbc=true
  -# The driver used to connect to the test database.  Must be in test classpath.
  -# Place jar containing drivers into the jakarta-avalon/tools/lib directory
  -test.jdbc.driver=org.postgresql.Driver
  -# JDBC URL used to connect to the test database.
  -#  All data in this database could be deleted by tests.
  -test.jdbc.url=jdbc:postgresql://localhost:5432/test
  -# Username and password to use when connecting to the test database
  -test.jdbc.user=test
  -test.jdbc.password=test
  +
  
  
  
  1.138     +15 -13    jakarta-avalon-excalibur/all/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/all/build.xml,v
  retrieving revision 1.137
  retrieving revision 1.138
  diff -u -r1.137 -r1.138
  --- build.xml	13 Apr 2002 05:50:14 -0000	1.137
  +++ build.xml	13 Apr 2002 08:30:05 -0000	1.138
  @@ -44,10 +44,6 @@
           <pathelement location="${excalibur-event.jar}"/>
           <pathelement location="${excalibur-logger.jar}"/>
           <pathelement location="${excalibur-datasource.jar}"/>
  -        <!--
  -        for one class in scratchpad. Commented out as this is recursive
  -        <pathelement location="${excalibur-fortress.jar}"/>
  -        -->
           <pathelement location="${j2ee.jar}"/>
           <pathelement location="${bsf.jar}"/>
           <pathelement location="${xerces.jar}"/>
  @@ -62,6 +58,7 @@
           </fileset>
           <pathelement path="${build.scratchpad}" />
           <!-- Unit testing deps -->
  +        <pathelement location="${excalibur-testcase.jar}"/>
           <pathelement location="${junit.jar}"/>
           <pathelement location="${junitperf.jar}"/>
       </path>
  @@ -72,6 +69,7 @@
           <pathelement location="${xalan.jar}"/>
           <pathelement location="${xml-apis.jar}"/>
           <pathelement location="${junit.jar}"/>
  +        <pathelement location="${bsf.jar}"/>
           <pathelement location="${tools.jar}"/>
           <fileset dir="${tools.dir}/lib">
               <include name="*.jar" />
  @@ -157,13 +155,6 @@
           <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkPool"/>
           <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkLogger"/>
           <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkDatasource"/>
  -        <!--
  -        <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkRequiredFile">
  -            <property name="name" value="excalibur-fortress.jar"/>
  -            <property name="path" value="${excalibur-fortress.jar}"/>
  -            <property name="proj.home" value="${basedir}/../fortress"/>
  -        </ant>
  -        -->
           <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkRequiredFile">
               <property name="name" value="xerces.jar"/>
               <property name="path" value="${xerces.jar}"/>
  @@ -179,6 +170,15 @@
           </ant>
       </target>
   
  +    <target name="dependencies-test" depends="jar, dependencies"
  +        description="Check unit test dependencies" unless="skip.dependencies">
  +        <!-- Need the jar to prevent recursive deps. -->
  +
  +        <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkJUnit"/>
  +        <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkTestcase"/>
  +    </target>
  +
  +
       <target name="compile" depends="compile-main, compile-scratchpad" description="Compiles
the source code"/>
   
       <!-- Compiles the source code -->
  @@ -254,7 +254,7 @@
       </target>
   
       <!-- Compiles all of the tests after copying them into a new src directory -->
  -    <target name="compile-tests" depends="compile">
  +    <target name="compile-tests" depends="compile, dependencies-test">
           <!-- Copy over all of the tests applying test filters -->
           <mkdir dir="${build.testsrc}"/>
           <copy todir="${build.testsrc}">
  @@ -360,6 +360,7 @@
       <target name="test-subset-check" unless="junit.test">
           <fail message="junit.test not specified.  Example usage: build -Djunit.test=**/ResourceLimiting*TestCase.class
test-subset" />
       </target>
  +
       <target name="test-subset" depends="test-subset-check, compile-tests" description="perferm
a subset of unit tests">
           <mkdir dir="${build.reports}"/>
   
  @@ -531,7 +532,8 @@
       </target>
   
       <!-- Creates all the .jar files -->
  -    <target name="all" depends="compile" description="generates the Excalibur jar files">
  +    <target name="all" depends="jar" description="generates the Excalibur jar files"/>
  +    <target name="jar" depends="compile" description="generates the Excalibur jar files">
   
           <mkdir dir="${build.lib}"/>
   
  
  
  
  1.6       +8 -0      jakarta-avalon-excalibur/all/default.properties
  
  Index: default.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/all/default.properties,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- default.properties	13 Apr 2002 05:50:14 -0000	1.5
  +++ default.properties	13 Apr 2002 08:30:05 -0000	1.6
  @@ -88,6 +88,14 @@
   # --------------------------------------------------
   #                OPTIONAL LIBRARIES
   # --------------------------------------------------
  +
  +# ----- Excalibur testcase, version 1.0 or later -----
  +excalibur-testcase.home=${basedir}/../testcase/dist
  +excalibur-testcase.lib=${excalibur-testcase.home}
  +excalibur-testcase.jar=${excalibur-testcase.lib}/excalibur-testcase-1.0.jar
  +
  +
  +
   j2ee.jar = ${cjan.lib}/j2ee.jar
   
   
  
  
  
  1.3       +33 -1     jakarta-avalon-excalibur/datasource/ant.properties.sample
  
  Index: ant.properties.sample
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/datasource/ant.properties.sample,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ant.properties.sample	6 Apr 2002 12:51:47 -0000	1.2
  +++ ant.properties.sample	13 Apr 2002 08:30:05 -0000	1.3
  @@ -10,7 +10,7 @@
   # It is overridden by ../ant.properties and ~/build.properties
   # It overrides all default.properties files and ~/.ant.properties
   #
  -# $Id: ant.properties.sample,v 1.2 2002/04/06 12:51:47 jefft Exp $
  +# $Id: ant.properties.sample,v 1.3 2002/04/13 08:30:05 jefft Exp $
   # -----------------------------------------------------------------------------
   
   # ----- Compile Control Flags -----
  @@ -19,12 +19,44 @@
   build.deprecation=off
   #build.compiler=jikes
   
  +
  +# Enable JDBC tests.  Configure for your database.
  +# WARNING - Tests may modify and/or destroy tables and data in the specified database.
  +#test.jdbc=true
  +# The driver used to connect to the test database.  Must be in test classpath.
  +# Place jar containing drivers into the jakarta-avalon/tools/lib directory
  +test.jdbc.driver=org.postgresql.Driver
  +# JDBC URL used to connect to the test database.
  +#  All data in this database could be deleted by tests.
  +test.jdbc.url=jdbc:postgresql://localhost:5432/test
  +# Username and password to use when connecting to the test database
  +test.jdbc.user=test
  +test.jdbc.password=test
  +
  +
   # ----- Base Directory in which all the packages are stored -----
   base.path=${basedir}/../..
   
   # --------------------------------------------------
   #                REQUIRED LIBRARIES
   # --------------------------------------------------
  +
  +# ----- Avalon Framework -----
  +avalon-framework.home=${basedir}/../../jakarta-avalon
  +avalon-framework.lib=${avalon-framework.home}/build/lib
  +avalon-framework.jar=${avalon-framework.lib}/avalon-framework.jar
  +
  +# ----- Logkit -----
  +avalon-logkit.home=${basedir}/../../jakarta-avalon-logkit
  +avalon-logkit.lib=${avalon-logkit.home}/build/lib
  +avalon-logkit.jar=${avalon-logkit.lib}/logkit.jar
  +
  +# ----- Excalibur pool, version 1.0 or later -----
  +excalibur-pool.home=${basedir}/../pool/dist
  +excalibur-pool.lib=${excalibur-pool.home}
  +excalibur-pool.jar=${excalibur-pool.lib}/excalibur-pool-1.0.jar
  +
  +
   
   # --------------------------------------------------
   #                OPTIONAL LIBRARIES
  
  
  
  1.9       +45 -10    jakarta-avalon-excalibur/datasource/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/datasource/build.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- build.xml	13 Apr 2002 05:50:14 -0000	1.8
  +++ build.xml	13 Apr 2002 08:30:05 -0000	1.9
  @@ -19,6 +19,10 @@
           <pathelement location="${excalibur-pool.jar}"/>
           <!-- Unit testing deps -->
           <pathelement location="${junit.jar}"/>
  +        <pathelement location="${excalibur-testcase.jar}"/>
  +        <pathelement location="${excalibur-component.jar}"/>
  +        <pathelement location="${excalibur-logger.jar}"/>
  +        <pathelement location="${build.testclasses}"/>
       </path>
       <property name="cp" refid="project.class.path"/>
   
  @@ -29,6 +33,11 @@
           <fileset dir="${tools.dir}/ext"/>
       </path>
   
  +    <path id="test.class.path">
  +        <path refid="tools.class.path"/>
  +        <path refid="project.class.path"/>
  +    </path>
  +
       <target name="main" depends="jar" description="Build the project"/>
       <target name="rebuild" depends="clean,main" description="Rebuild the project"/>
   
  @@ -44,6 +53,9 @@
           <!-- Need the jar to prevent recursive deps. -->
   
           <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkJUnit"/>
  +        <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkTestcase"/>
  +        <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkComponent"/>
  +        <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkLogger"/>
       </target>
   
   
  @@ -140,22 +152,38 @@
   
       <!-- Compiles the unit test source code -->
       <target name="compile-test" depends="compile, dependencies-test" description="Compiles
the source code">
  +        <!-- Copy over all of the tests applying test filters -->
  +        <mkdir dir="${build.testsrc}"/>
  +        <copy todir="${build.testsrc}">
  +            <filterset>
  +                <filter token="test.jdbc.driver"   value="${test.jdbc.driver}"/>
  +                <filter token="test.jdbc.url"      value="${test.jdbc.url}"/>
  +                <filter token="test.jdbc.user"     value="${test.jdbc.user}"/>
  +                <filter token="test.jdbc.password" value="${test.jdbc.password}"/>
  +            </filterset>
   
  -        <mkdir dir="${build.classes}"/>
  +            <!-- All tests in the src/test directory -->
  +            <fileset dir="${test.dir}">
  +                <include name="**/test/**"/>
  +                <include name="*Test.java"/>
  +            </fileset>
  +        </copy>
   
  -        <!-- Compile all classes including the tests. -->
  -        <javac srcdir="${test.dir}"
  -            destdir="${build.classes}"
  +        <mkdir dir="${build.testclasses}"/>
  +
  +        <!-- Compile all of the tests -->
  +        <javac srcdir="${build.testsrc}"
  +            destdir="${build.testclasses}"
               debug="${build.debug}"
               optimize="${build.optimize}"
               deprecation="${build.deprecation}"
               target="1.2">
  -            <classpath refid="project.class.path" />
  -            <include name="**/*.java"/>
  +            <classpath refid="test.class.path" />
           </javac>
  -
  -        <copy todir="${build.classes}">
  -            <fileset dir="${test.dir}">
  + 
  +        <!-- Copy all test resources -->
  +        <copy todir="${build.testclasses}">
  +            <fileset dir="${build.testsrc}">
                   <exclude name="**/*.java"/>
               </fileset>
           </copy>
  @@ -253,13 +281,20 @@
               haltonfailure="${junit.failonerror}"
               printsummary="yes"
               dir="${build.tests}">
  +
  +            <sysproperty key="test.jdbc.driver"   value="${test.jdbc.driver}"/>
  +            <sysproperty key="test.jdbc.url"      value="${test.jdbc.url}"/>
  +            <sysproperty key="test.jdbc.user"     value="${test.jdbc.user}"/>
  +            <sysproperty key="test.jdbc.password" value="${test.jdbc.password}"/>
  +
  +
               <classpath refid="project.class.path"/>
   
               <formatter type="xml"/>    <!-- xml reports for junitreport -->
               <formatter type="plain"/>  <!-- text reports for humans     -->
   
               <batchtest todir="${build.tests}">
  -                <fileset dir="${build.classes}">
  +                <fileset dir="${build.testclasses}">
                       <include name="**/test/*TestCase.class"/>
                       <exclude name="**/Abstract*"/>
                   </fileset>
  
  
  
  1.4       +23 -0     jakarta-avalon-excalibur/datasource/default.properties
  
  Index: default.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/datasource/default.properties,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- default.properties	13 Apr 2002 05:50:14 -0000	1.3
  +++ default.properties	13 Apr 2002 08:30:05 -0000	1.4
  @@ -30,6 +30,27 @@
   excalibur-pool.lib=${excalibur-pool.home}
   excalibur-pool.jar=${excalibur-pool.lib}/excalibur-pool-1.0.jar
   
  +# --------------------------------------------------
  +#                OPTIONAL LIBRARIES
  +# --------------------------------------------------
  +
  +# For unit testing
  +
  +# ----- Excalibur testcase, version 1.0 or later -----
  +excalibur-testcase.home=${basedir}/../testcase/dist
  +excalibur-testcase.lib=${excalibur-testcase.home}
  +excalibur-testcase.jar=${excalibur-testcase.lib}/excalibur-testcase-1.0.jar
  +
  +# ----- Excalibur component, version 1.0 or later -----
  +excalibur-component.home=${basedir}/../component/dist
  +excalibur-component.lib=${excalibur-component.home}
  +excalibur-component.jar=${excalibur-component.lib}/excalibur-component-1.0.jar
  +
  +# ----- Excalibur logger, version 1.0 or later -----
  +excalibur-logger.home=${basedir}/../logger/dist
  +excalibur-logger.lib=${excalibur-logger.home}
  +excalibur-logger.jar=${excalibur-logger.lib}/excalibur-logger-1.0.jar
  +
   
   # --------------------------------------------------
   
  @@ -43,6 +64,8 @@
   #  location of intermediate products
   build.dir = build
   build.src = ${build.dir}/src
  +build.testsrc = ${build.dir}/testsrc
  +build.testclasses = ${build.dir}/testclasses
   build.lib = ${build.dir}/lib
   build.conf = ${build.dir}/conf
   build.classes = ${build.dir}/classes
  
  
  
  1.2       +1 -1      jakarta-avalon-excalibur/datasource/src/test/org/apache/avalon/excalibur/datasource/test/DataSourceJdbcTestCase.xtest
  
  Index: DataSourceJdbcTestCase.xtest
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/datasource/src/test/org/apache/avalon/excalibur/datasource/test/DataSourceJdbcTestCase.xtest,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DataSourceJdbcTestCase.xtest	7 Feb 2002 08:39:21 -0000	1.1
  +++ DataSourceJdbcTestCase.xtest	13 Apr 2002 08:30:06 -0000	1.2
  @@ -3,7 +3,7 @@
       <![CDATA[
         <title>DataSource Tests</title>
         <para>
  -        This series of tests excersize the JDBC DataSourceComponent provided by
  +        This series of tests exercise the JDBC DataSourceComponent provided by
           Excalibur.  The configuration is specified in the file located in
           <parameter>jakarta-avalon-excalibur/src/test/org/apache/avalon/excalibur/datasource/test/DataSourceJdbcTestCase.xtext</parameter>.
           You may edit the test to customize the settings.
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message