Update of /cvsroot/monetdb/clients/src/java/tests
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv9099
Modified Files:
Tag: Clients_1-20
build.xml
Added Files:
Tag: Clients_1-20
Test_PSlargeresponse.java
Log Message:
test PreparedStatement for large responses
--- NEW FILE: Test_PSlargeresponse.java ---
/*
* The contents of this file are subject to the MonetDB Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations
* under the License.
*
* The Original Code is the MonetDB Database System.
*
* The Initial Developer of the Original Code is CWI.
* Portions created by CWI are Copyright (C) 1997-2007 CWI.
* All Rights Reserved.
*/
import java.sql.*;
import java.util.*;
public class Test_PSlargeresponse {
public static void main(String[] args) throws Exception {
Class.forName("nl.cwi.monetdb.jdbc.MonetDriver");
Connection con = DriverManager.getConnection(args[0]);
Statement stmt = con.createStatement();
PreparedStatement pstmt;
// retrieve this to simulate a bug report
DatabaseMetaData dbmd = con.getMetaData();
// >> true: auto commit should be on
System.out.println("0. true\t" + con.getAutoCommit());
try {
System.out.print("1. DatabaseMetadata environment
retrieval... ");
System.out.println(dbmd.getURL());
pstmt = con.prepareStatement("select * from columns");
System.out.print("2. empty call...");
try {
// should succeed (no arguments given)
pstmt.execute();
System.out.println(" passed :)");
} catch (SQLException e) {
System.out.println(" FAILED :(");
System.out.println("ABORTING TEST!!!");
System.exit(-1);
}
} catch (SQLException e) {
System.out.println("FAILED :( "+ e.getMessage());
System.out.println("ABORTING TEST!!!");
}
con.close();
}
}
Index: build.xml
===================================================================
RCS file: /cvsroot/monetdb/clients/src/java/tests/build.xml,v
retrieving revision 1.6.2.1
retrieving revision 1.6.2.2
diff -u -d -r1.6.2.1 -r1.6.2.2
--- build.xml 17 Nov 2007 20:56:54 -0000 1.6.2.1
+++ build.xml 17 Nov 2007 21:01:38 -0000 1.6.2.2
@@ -91,6 +91,7 @@
<antcall target="Test_Creplysize" />
<antcall target="Test_Csavepoints" />
<antcall target="Test_Ctransaction" />
+ <antcall target="Test_PSlargeresponse" />
<antcall target="Test_PStimedate" />
<antcall target="Test_PStimezone" />
<antcall target="Test_PStypes" />
@@ -158,6 +159,12 @@
</antcall>
</target>
+ <target name="Test_PSlargeresponse">
+ <antcall target="test_class">
+ <param name="test.class" value="Test_PSlargeresponse" />
+ </antcall>
+ </target>
+
<target name="Test_PStimedate">
<antcall target="test_class">
<param name="test.class" value="Test_PStimedate" />
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins