db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r638919 - /db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMetaDataJdbc30Test.java
Date Wed, 19 Mar 2008 16:14:27 GMT
Author: dyre
Date: Wed Mar 19 09:14:22 2008
New Revision: 638919

URL: http://svn.apache.org/viewvc?rev=638919&view=rev
Log:
DERBY-2658: Convert jdbcapi/parameterMetaDataJdbc30.java to JUnit
Fix SQLState assertions
Patch contributed by Ramin Moazeni
Merged to 10.3 with  svn merge -r 572661:572662 ../derby-xact
No conflicts.

Modified:
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMetaDataJdbc30Test.java

Modified: db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMetaDataJdbc30Test.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMetaDataJdbc30Test.java?rev=638919&r1=638918&r2=638919&view=diff
==============================================================================
--- db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMetaDataJdbc30Test.java
(original)
+++ db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMetaDataJdbc30Test.java
Wed Mar 19 09:14:22 2008
@@ -283,7 +283,7 @@
 			fail("DERBY-44 failed (didn't get SQLSTATE 22019)");
           		rs.close();
       		} catch (SQLException e) {
-			assertSQLState("22019", e.getSQLState(), e);
+			assertSQLState("22019", e);
       		}
 		ps.close();
 	}
@@ -723,26 +723,33 @@
 	static void dumpParameterMetaDataNegative(ParameterMetaData paramMetaData) throws SQLException
{
 
                 int numParam = paramMetaData.getParameterCount();
+
+		/*
+                *  DERBY-3039 - ParameterMetaData.isNullable() returns differenet SQLState
in Embedded  
+                *  and Network Client 
+                */
+		String expectedSQLState = (usingEmbedded())?"XCL13":"XCL14";
+	
 		try {
        			paramMetaData.isNullable(-1);
        			fail("parameterMetaData.isNullable(-1) should have failed");
    		} catch (SQLException se)
        		{
-       			assertSQLState("XCL13",se.getSQLState(), se);
+       			assertSQLState(expectedSQLState, se);
        		}
 		try {
                         paramMetaData.isNullable(0);
                         fail("parameterMetaData.isNullable(0) should have failed");
                 } catch (SQLException se)
                 {
-                        assertSQLState("XCL13",se.getSQLState(), se);
+                        assertSQLState(expectedSQLState, se);
                 }
 		try {
                         paramMetaData.isNullable(numParam+1);
                         fail("parameterMetaData.isNullable("+(numParam+1)+") should have
failed");
                 } catch (SQLException se)
                 {
-                        assertSQLState("XCL13",se.getSQLState(), se);
+                        assertSQLState(expectedSQLState, se);
                 }
 
 	}
@@ -810,5 +817,5 @@
          * @param in_param4 
          */
         public static void dummyDecimal(BigDecimal in_param, BigDecimal in_param2, BigDecimal[]
in_param3, BigDecimal[] in_param4) {
-        }
+	 }
 }



Mime
View raw message