avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hamm...@apache.org
Subject cvs commit: jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/test Tester.java
Date Thu, 29 Nov 2001 23:08:59 GMT
hammant     01/11/29 15:08:59

  Modified:    apps/db  build.xml
               apps/db/src/java/org/apache/avalon/db/test Tester.java
  Log:
  Tester is capable of handling sql and lxsql now.
  
  Revision  Changes    Path
  1.23      +2 -3      jakarta-avalon-cornerstone/apps/db/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/build.xml,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- build.xml	2001/11/29 14:26:13	1.22
  +++ build.xml	2001/11/29 23:08:59	1.23
  @@ -335,11 +335,10 @@
     
     <target name="docs"/>
     
  -  <target name="test1" depends="main">
  -  
  +  <target name="testl1" depends="main">
       <property name="script" location="src/scripts/lxsql/Test1.script"/>
  -  
       <java classname="org.apache.avalon.db.test.Tester" fork="true">          
  +      <arg value="lxsql"/>    
         <arg value="${script}"/>
         <classpath refid="test.path"/>
       </java>  
  
  
  
  1.34      +7 -6      jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/test/Tester.java
  
  Index: Tester.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/db/src/java/org/apache/avalon/db/test/Tester.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- Tester.java	2001/11/29 14:26:13	1.33
  +++ Tester.java	2001/11/29 23:08:59	1.34
  @@ -22,9 +22,9 @@
       Connection mCon;
       String mLxsql;
   
  -    private Tester(String scriptFile) throws Exception {
  +    private Tester(String type, String scriptFile) throws Exception {
           Class.forName("org.apache.avalon.db.driver.AvalonDBDriver").newInstance();
  -        String url = "jdbc:avalondb:cmds:lxsql:BlahBlah:localhost:9001";
  +        String url = "jdbc:avalondb:cmds:"+type+":BlahBlah:localhost:9001";
           mCon = DriverManager.getConnection(url, "todo", "todo");
   
           String D = File.separator;
  @@ -103,12 +103,13 @@
   
   
       public static void main(String[] args) {
  -        if (args.length == 0) {
  -            System.err.println("First argument should be a script file");
  +        if (args.length < 2) {
  +            System.err.println("First argument should be the type (lxsql/sql), the second
a script file path");
           }
  -        String scriptFile = args[0];
  +        String type = args[0];
  +        String scriptFile = args[1];
           try {
  -            Tester tester = new Tester(scriptFile);
  +            Tester tester = new Tester(type, scriptFile);
               tester.test();
               tester.close();
           } catch (Exception e) {
  
  
  

--
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