Changeset: 3ee02e94bd1d for monetdb-java
URL: https://dev.monetdb.org/hg/monetdb-java?cmd=changeset;node=3ee02e94bd1d
Modified Files:
        tests/Bug_LargeQueries_6571_6693.java
        tests/Test_PSsomeamount.java
        tests/Test_Sbatching.java
Branch: default
Log Message:

Reduce number of queries to speed up testing


diffs (60 lines):

diff --git a/tests/Bug_LargeQueries_6571_6693.java 
b/tests/Bug_LargeQueries_6571_6693.java
--- a/tests/Bug_LargeQueries_6571_6693.java
+++ b/tests/Bug_LargeQueries_6571_6693.java
@@ -14,7 +14,7 @@ import java.sql.SQLException;
 
 public class Bug_LargeQueries_6571_6693 {
        final static String tbl_nm = "tbl6693";
-       final static String largedata = createLargedata(98765);
+       final static String largedata = createLargedata(9216);
 
        private static String createLargedata(int num) {
                String repeatValue = "*";
@@ -107,7 +107,7 @@ public class Bug_LargeQueries_6571_6693 
                System.out.println("Completed second test");
 
                // next try to make the execution hang by sending very many 
queries combined in 1 large script
-               final int queries = 8765;
+               final int queries = 100;
                StringBuilder sb = new StringBuilder(queries * 13);
                for (int i = 1; i <= queries; i++)
                        sb.append(" SELECT ").append(i).append(';');
diff --git a/tests/Test_PSsomeamount.java b/tests/Test_PSsomeamount.java
--- a/tests/Test_PSsomeamount.java
+++ b/tests/Test_PSsomeamount.java
@@ -24,11 +24,11 @@ public class Test_PSsomeamount {
 
                try {
                        System.out.println("1. Preparing and executing a unique 
statement");
-                       for (int i = 0; i < 10000; i++) {
+                       for (int i = 0; i < 100; i++) {
                                pstmt = con.prepareStatement("select " + i + ", 
" + i + " = ?");
                                pstmt.setInt(1, i);
                                ResultSet rs = pstmt.executeQuery();
-                               if (rs.next() && i % 1000 == 0) {
+                               if (rs.next() && i % 20 == 0) {
                                        System.out.println(rs.getInt(1) + ", " 
+ rs.getBoolean(2));
                                }
                                /* this call should cause resources on the 
server to be
diff --git a/tests/Test_Sbatching.java b/tests/Test_Sbatching.java
--- a/tests/Test_Sbatching.java
+++ b/tests/Test_Sbatching.java
@@ -26,14 +26,14 @@ public class Test_Sbatching {
                        System.out.println("passed :)");
 
                        // start batching a large amount of inserts
-                       for (int i = 1; i <= 30000; i++) {
+                       for (int i = 1; i <= 150; i++) {
                                stmt.addBatch("INSERT INTO table_Test_Sbatching 
VALUES (" + i + ")");
-                               if (i % 400 == 0) {
-                                       System.out.print("2. executing batch 
(400 inserts)...");
+                               if (i % 50 == 0) {
+                                       System.out.print("2. executing batch 
(50 inserts)...");
                                        int[] cnts = stmt.executeBatch();
                                        System.out.println("passed :)");
                                        System.out.print("3. checking number of 
update counts...");
-                                       if (cnts.length != 400)
+                                       if (cnts.length != 50)
                                                throw new SQLException("Invalid 
size: " + cnts.length);
                                        System.out.println(cnts.length + " 
passed :)");
                                        System.out.print("4. checking update 
counts (should all be 1)...");
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to