commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bali...@apache.org
Subject cvs commit: jakarta-commons-sandbox/simplestore/src/test/org/apache/commons/simplestore TestAll.java
Date Sat, 09 Feb 2002 14:58:51 GMT
baliuka     02/02/09 06:58:51

  Modified:    simplestore build.xml
               simplestore/src/sample/org/apache/commons/simplestore/persistence
                        PersistentProxy.java
               simplestore/src/test/org/apache/commons/simplestore
                        TestAll.java
  Log:
  Modified build.xml for sample, script adds all .jar files from /lib to classpath
  fork="no" for tests, it is for embeded HSQL database.
  
  Revision  Changes    Path
  1.11      +26 -4     jakarta-commons-sandbox/simplestore/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/simplestore/build.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- build.xml	26 Jan 2002 12:00:35 -0000	1.10
  +++ build.xml	9 Feb 2002 14:58:51 -0000	1.11
  @@ -2,7 +2,7 @@
   
   <!--
           "simplestore" component of the Jakarta Commons Subproject
  -        $Id: build.xml,v 1.10 2002/01/26 12:00:35 froehlich Exp $
  +        $Id: build.xml,v 1.11 2002/02/09 14:58:51 baliuka Exp $
   -->
   
   <!-- ========== Executable Targets ======================================== -->
  @@ -33,6 +33,7 @@
       <property name="build.home"              value="build"/>
       <property name="dist.home"               value="dist"/>
       <property name="source.home"             value="src/java"/>
  +    <property name="sample.home"             value="src/sample"/>
       <property name="source.test"             value="src/test"/>
     
       <property name="compile.debug"           value="true"/>
  @@ -43,7 +44,12 @@
         <pathelement location="${build.home}/classes"/>
         <pathelement location="${commons-collections.jar}"/>
         <pathelement location="${jisp.jar}"/>
  +      <fileset dir="./lib">
  +		<include name="*.*"/>
  +       </fileset>
       </path>
  +  
  +  
   
       <!-- ========== Test Execution Defaults =================================== -->
       <property name="cp" value=""/>
  @@ -73,6 +79,17 @@
       </javac>
     </target>
   
  + <target name="compile-sample" depends="prepare" description="Compile sample">
  +    <javac  srcdir="${sample.home}"
  +            destdir="${build.home}/classes"
  +            debug="${compile.debug}"
  +            deprecation="${compile.deprecation}"
  +            optimize="${compile.optimize}">
  +      <classpath refid="compile.classpath"/>
  +    </javac>
  +  </target>
  +
  +
     <target name="clean" depends="init"
      description="Clean build and distribution directories">
       <delete    dir="${build.home}"/>
  @@ -111,22 +128,27 @@
       </jar>    
     </target>
     
  -  <target name="build-test" depends="compile">
  +  <target name="build-test" depends="compile,compile-sample">
       <javac srcdir="${source.test}"
              destdir="${build.home}/classes"
              debug="${compile.debug}"
              deprecation="${compile.deprecation}"
  -           optimize="${compile.optimize}"/>
  +           optimize="${compile.optimize}">
  +   <classpath refid="compile.classpath"/>
  +   </javac>
     </target>
     
     <target name="test" depends="build-test" description="runs (junit) unit tests">
  -    <java classname="${test.runner}" fork="yes" failonerror="${test.failonerror}" 
  +    <java classname="${test.runner}" fork="no" failonerror="${test.failonerror}" 
        maxmemory="${maxmemory}">
         <arg value="${test.entry}"/>
           <classpath>
             <pathelement path=" ${build.home}/classes" />
             <pathelement path="${classpath}" />
             <pathelement path="${java.class.path}" />
  +          <fileset dir="./lib">
  +		<include name="*.*"/>
  +          </fileset>
           </classpath>
       </java>
     </target>
  
  
  
  1.3       +5 -5      jakarta-commons-sandbox/simplestore/src/sample/org/apache/commons/simplestore/persistence/PersistentProxy.java
  
  Index: PersistentProxy.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/simplestore/src/sample/org/apache/commons/simplestore/persistence/PersistentProxy.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PersistentProxy.java	9 Feb 2002 13:49:47 -0000	1.2
  +++ PersistentProxy.java	9 Feb 2002 14:58:51 -0000	1.3
  @@ -14,7 +14,7 @@
    *
    * @author Juozas Baliuka <a href="mailto:baliuka@mwm.lt">
    *      baliuka@mwm.lt</a>
  - * @version $Id: PersistentProxy.java,v 1.2 2002/02/09 13:49:47 baliuka Exp $
  + * @version $Id: PersistentProxy.java,v 1.3 2002/02/09 14:58:51 baliuka Exp $
    */
   public class PersistentProxy implements MetaObject, InvocationHandler, java.io.Serializable
{
       
  @@ -169,7 +169,7 @@
       public static Persistent getPersitent(Class persistent,Object oid,boolean newCreated,
TransactionManager transactionManager){
           PersistentProxy handler = new PersistentProxy(persistent,oid,newCreated, transactionManager);
           Persistent p =  (Persistent)Proxy.newProxyInstance(
  -        ClassLoader.getSystemClassLoader(),new Class[]{persistent,Persistent.class},handler);
  +        Thread.currentThread().getContextClassLoader(),new Class[]{persistent,Persistent.class},handler);
           handler.object = p; 
           if( newCreated ) {
               
  @@ -307,9 +307,9 @@
                   return object;
               }
               
  -            if( object instanceof String ){
  -                return org.apache.commons.beanutils.ConvertUtils.convert((String)object,cls);
  -            }
  +           // if( object instanceof String ){ ?????
  +           //     return org.apache.commons.beanutils.ConvertUtils.convert((String)object,cls);
  +           // }
               
               
               if( cls.isAssignableFrom(Number.class ) && object instanceof Number
){
  
  
  
  1.5       +3 -1      jakarta-commons-sandbox/simplestore/src/test/org/apache/commons/simplestore/TestAll.java
  
  Index: TestAll.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/simplestore/src/test/org/apache/commons/simplestore/TestAll.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestAll.java	27 Jan 2002 17:42:00 -0000	1.4
  +++ TestAll.java	9 Feb 2002 14:58:51 -0000	1.5
  @@ -13,7 +13,7 @@
   /**
    * @author Gerhard Froehlich <a href="mailto:g-froehlich@gmx.de">
    *      g-froehlich@gmx.de</a>
  - * @version $Id: TestAll.java,v 1.4 2002/01/27 17:42:00 froehlich Exp $
  + * @version $Id: TestAll.java,v 1.5 2002/02/09 14:58:51 baliuka Exp $
    */
   public class TestAll extends TestCase {
       public TestAll(String testName) {
  @@ -23,6 +23,8 @@
       public static Test suite() {
           TestSuite suite = new TestSuite();
           suite.addTest(TestSoftRefMemoryStore.suite());
  +        TestPersistent.class.getName();
  +        suite.addTest(TestSample.suite());
           //suite.addTest(TestMRUMemoryStore.suite());
           //suite.addTest(TestJispFilesystemStore.suite());
           return suite;
  
  
  

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


Mime
View raw message