db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r678797 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/multi/StressMultiTest.java
Date Tue, 22 Jul 2008 16:29:07 GMT
Author: kmarsden
Date: Tue Jul 22 09:29:06 2008
New Revision: 678797

URL: http://svn.apache.org/viewvc?rev=678797&view=rev
Log:
DERBY-1764 (partial) Add in assertDrainResults for select to make sure statement executes
completely and also to workaround DERBY-3789

Contributed by Erlend Birkenes


Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/multi/StressMultiTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/multi/StressMultiTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/multi/StressMultiTest.java?rev=678797&r1=678796&r2=678797&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/multi/StressMultiTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/multi/StressMultiTest.java
Tue Jul 22 09:29:06 2008
@@ -25,6 +25,7 @@
 import java.io.ByteArrayOutputStream;
 import java.io.PrintStream;
 import java.sql.Connection;
+import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Statement;
 import java.util.Date;
@@ -39,6 +40,7 @@
 import org.apache.derbyTesting.junit.BaseTestCase;
 import org.apache.derbyTesting.junit.CleanDatabaseTestSetup;
 import org.apache.derbyTesting.junit.Decorator;
+import org.apache.derbyTesting.junit.JDBC;
 import org.apache.derbyTesting.junit.TestConfiguration;
 
 /**
@@ -514,7 +516,8 @@
         private void select(String table) throws SQLException {
             Statement s = con.createStatement();
             try {
-                s.executeQuery("select * from " + table);
+                ResultSet rs = s.executeQuery("select * from " + table);
+                JDBC.assertDrainResults(rs);
             } catch (SQLException se) {
                 String e = se.getSQLState();
                 if (e.equals("42Y55") || e.equals("42000") || e.equals("40001")



Mime
View raw message