db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r618843 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LangProcedureTest.java
Date Wed, 06 Feb 2008 00:50:14 GMT
Author: djd
Date: Tue Feb  5 16:50:12 2008
New Revision: 618843

URL: http://svn.apache.org/viewvc?rev=618843&view=rev
Log:
Add a couple of asserts to LangProcedureTest to verify number of results sets and warnings
related to a procedure returning too many result sets

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LangProcedureTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LangProcedureTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LangProcedureTest.java?rev=618843&r1=618842&r2=618843&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LangProcedureTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/LangProcedureTest.java
Tue Feb  5 16:50:12 2008
@@ -758,16 +758,22 @@
         toomany.execute();
         SQLWarning warn = toomany.getWarnings();
         // DERBY-159. Network Server does not get warning
-        if (usingEmbedded())
+        if (usingEmbedded()) {
+            assertNotNull(warn);
             assertEquals("0100E", warn.getSQLState());
+        }
         rs = toomany.getResultSet();
         JDBC.assertFullResultSet(rs, new String[][] { { "2", "int" } });
+        JDBC.assertNoMoreResults(toomany);
 
         toomany.setInt(1, 2);
         toomany.setInt(2, 99); // will close the second result set.
         toomany.execute();
         rs = toomany.getResultSet();
+        // Single result set returned, therefore no warnings.
+        assertNull(toomany.getWarnings());
         JDBC.assertFullResultSet(rs, new String[][] { { "2", "int" } });
+        JDBC.assertNoMoreResults(toomany);
         toomany.close();
         s.execute("drop procedure way.toomany");
 



Mime
View raw message