db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrn...@apache.org
Subject svn commit: r1244295 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests: derbynet/ jdbcapi/ lang/
Date Wed, 15 Feb 2012 00:53:09 GMT
Author: myrnavl
Date: Wed Feb 15 00:53:08 2012
New Revision: 1244295

URL: http://svn.apache.org/viewvc?rev=1244295&view=rev
Log:
DERBY-4785; Remove JCC tests and references to JCC in test code
  Removing JCC and references to JCC and DB2Client from junit tests
  patch contributed by Jayaram Subramanian (rsjay1976 at gmail dot com)

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSSecurityMechanismTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobClob4BlobTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ConcurrencyTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DriverTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/HoldabilityTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ProcedureTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetCloseTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURQueryMixTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ScrollResultSetTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/UpdatableResultSetTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/UpdateXXXTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TableFunctionTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSSecurityMechanismTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSSecurityMechanismTest.java?rev=1244295&r1=1244294&r2=1244295&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSSecurityMechanismTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSSecurityMechanismTest.java
Wed Feb 15 00:53:08 2012
@@ -93,54 +93,13 @@ import junit.framework.TestSuite;
  * will work are IBM JVM [versions 1.4.1, later versions of 1.4.2 (from 2005),
  * 1.5]
  * 
- * #2) JCC 2.6 client does some automatic upgrade of security mechanism in one
- * case. Logic is  as follows:
- * If client sends USRIDPWD to server and server rejects this
- * and says it accepts only EUSRIDPWD, in that case JCC 2.6 will upgrade the 
- * security mechanism to EUSRIDPWD and retry the request with EUSRIDPWD.
- * This switching will also override the security mechanism specified by user.
- * Thus if JCC client is running with Sun JVM 1.4.2 and even though Sun JCE
- * does not have support for algorithms needed for  EUSRIDPWD, the JCC client
- * will still try to switch to  EUSRIDPWD and throw an exception with 
- * ClassNotFoundException for the IBM JCE.
- *
- * - Default security mechanism is USRIDPWD(0x03)
- * - If securityMechanism is not explicitly specified on connection request 
- *   and if no user specified, an exception is thrown - Null userid not 
- *   supported
- * - If securityMechanism is not explicitly specified on connection request, 
- *   and if no password is specified, an exception is thrown - null password
- *   not supported
- *   If securityMechanism is explicitly specified to be USRIDONL,  then a
- *   password is not required. But in other cases (EUSRIDPWD, USRIDPWD, 
- *   USRSSBPWD) if password is null, an exception with the message 'a null
- *   password not valid' will be thrown.
- * - On datasource, setting a security mechanism works. It also allows a 
- *   security mechanism of USRIDONL to be set on datasource unlike jcc 2.4.
- * 
- * #3)JCC 2.4 client behavior 
- * Default security mechanism used is USRIDPWD (0x03)
- * If securityMechanism is not explicitly specified on connection request, and
- * if no user is specified, an exception is thrown - Null userid not supported.
- * If securityMechanism is not explicitly specified on connection request, and
- * if no password is specified, an exception is thrown - null password not
- * supported.
- * If security mechanism is specified, jcc client will not override the 
- * security mechanism.
- * If securityMechanism is explicitly specified to be USRIDONL, then a password
- * is not required. But in other cases (EUSRIDPWD,USRIDPWD) if password is null
- * an exception with the message 'a null password not valid' will be thrown.
- * On datasource, setting a security mechanism does not work (bug). It defaults
- * to USRIDPWD.  Setting a value of USRIDONL or EUSRIDPWD does not seem to have
- * an effect.
- * 
- * #4) Note, if  server restricts the client connections based on security 
+ * #2) Note, if  server restricts the client connections based on security 
  * mechanism by setting derby.drda.securityMechanism, in that case the clients 
  * will see an error similar to this:
  * "Connection authorization failure occurred. Reason: security mechanism not
  *  supported"
  *
- * #5) USRSSBPWD - Strong password substitute is only supported starting from
+ * #3) USRSSBPWD - Strong password substitute is only supported starting from
  *     Apache Derby 10.2.
  *	 NOTE: USRSSBPWD only works with the derby network client driver for now.
  *   ---- 
@@ -501,7 +460,6 @@ public class NSSecurityMechanismTest ext
      */
     private void assertConnectionUsingDataSource(String[] expectedValues)
     {
-        // Note: bug in jcc, throws error with null password
         if (usingDerbyNetClient())
         {
             assertSecurityMechanismOK("sarah",null, new Short(
@@ -510,11 +468,6 @@ public class NSSecurityMechanismTest ext
         assertSecurityMechanismOK("john","sarah", new Short(
             SECMEC_USRIDPWD),"SECMEC_USRIDPWD:", expectedValues[2]);
 
-        // Possible bug in JCC, hence disable this test for JCC framework only
-        // the security mechanism when set on JCC datasource does not seem to 
-        // have an effect. JCC driver is sending a secmec of 3( USRIDPWD) to 
-        // the server even though the security mechanism on datasource is set to 
-        // EUSRIDPWD (9)
         if (usingDerbyNetClient())
         {
             // Please note: EUSRIDPWD security mechanism in DRDA uses 
@@ -529,7 +482,6 @@ public class NSSecurityMechanismTest ext
             // The test methods are implemented to work either way.
             assertSecurityMechanismOK("john","sarah",new Short(
                 SECMEC_EUSRIDPWD),"SECMEC_EUSRIDPWD:", expectedValues[3]);
-            // JCC does not support USRSSBPWD security mechanism
             assertSecurityMechanismOK("john","sarah",new Short(
                 SECMEC_USRSSBPWD),"SECMEC_USRSSBPWD:", expectedValues[4]);
         }
@@ -670,11 +622,8 @@ public class NSSecurityMechanismTest ext
      * level comments (#1)
      * <BR>
      * The expected output from this test will depend on the following
-     * -- the client behavior (JCC 2.4, JCC2.6 or derby client).For the derby
-     * client, the table below represents what security mechanism the client
-     * will send to server. 
-     * -- See class level comments (#2,#3) to understand the JCC2.6 and JCC2.4 
-     * behavior
+     * -- the client behavior. For the derby client, the table below 
+     * represents what security mechanism the client will send to server. 
      * -- Note: in case of derby client, if no user  is specified, user 
      * defaults to APP.
      * -- Will depend on if the server has been started with property 
@@ -836,8 +785,7 @@ public class NSSecurityMechanismTest ext
                 if (PWD_ATTRIBUTE[j] != null)
                     urlAttributes += "password=" + PWD_ATTRIBUTE[j] +";";
                 
-                // removing the last semicolon that we added here, getJDBCUrl
-                // will add another semicolon for jcc, which would be too many.
+                // removing the last semicolon that we added here
                 if (urlAttributes.length() >= 1)
                     urlAttributes = urlAttributes.substring(
                         0,urlAttributes.length()-1);
@@ -939,10 +887,6 @@ public class NSSecurityMechanismTest ext
         {
             // Exceptions expected in certain case hence printing message
             // instead of stack traces here. 
-            // - For cases when userid is null or password is null and by
-            //   default JCC does not allow a null password or null userid.
-            // - For case when JVM does not support EUSRIDPWD and JCC 2.6 
-            //   tries to do autoswitching of security mechanism.
             // - For case if server doesnt accept connection with this 
             //   security mechanism
             // - For case when client driver does support USRSSBPWD security
@@ -1059,9 +1003,6 @@ public class NSSecurityMechanismTest ext
      * with initializing EncryptionManager will happen. This will happen for 
      * Sun JVM (versions 1.3.1, 1.4.1, 1.4.2, 1.5) and 
      * IBM JVM (versions 1.3.1 and some old versions of 1.4.2 (in 2004) )
-     * For JCC clients, error message is   
-     * "java.lang.ClassNotFoundException is caught when initializing
-     * EncryptionManager 'IBMJCE'"
      * For derby client, the error message is 
      * "Security exception encountered, see next exception for details."
      * 2)If server does not accept EUSRIDPWD security mechanism from clients,then
@@ -1256,18 +1197,9 @@ public class NSSecurityMechanismTest ext
     {
         String hostName = TestConfiguration.getCurrent().getHostName();
         int port = TestConfiguration.getCurrent().getPort();
-        if (usingDB2Client())
-        {
-            //attrs.put("retrieveMessagesFromServerOnGetMessage","true");
-            attrs.put("driverType","4");
-            /**
-             * As per the fix of derby-410 servername should
-             * default to localhost, but for jcc it's still needed  
-             */
-            attrs.put("serverName",hostName);
-        }
         /** 
-         * For a remote host of course it's also needed 
+         * serverName defaults to localhost (see DERBY-410), 
+         * but for a remote host it's needed 
          */
         if (!hostName.equals("localhost"))
         {

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobClob4BlobTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobClob4BlobTest.java?rev=1244295&r1=1244294&r2=1244295&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobClob4BlobTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobClob4BlobTest.java
Wed Feb 15 00:53:08 2012
@@ -870,9 +870,6 @@ public class BlobClob4BlobTest extends B
                     "should have caused an exception");
         }  catch (SQLException e) {
             checkException(BLOB_POSITION_TOO_LARGE, e);
-        } catch (StringIndexOutOfBoundsException se) {
-            assertTrue("FAIL - This exception should only happen with " +
-                    "DB2 client", usingDB2Client());
         }
         // 0 or negative position value
         try {
@@ -2250,21 +2247,14 @@ public class BlobClob4BlobTest extends B
                             "exception");
                 } catch (SQLException e) {
                     checkException(BLOB_POSITION_TOO_LARGE, e);
-                } catch (NegativeArraySizeException nase) {
-                    assertTrue("FAIL - this exception should only happen " +
-                            "with DB2 client", usingDB2Client());
                 }
                 // 0 or negative position value
                 try {
                     blob.position(new byte[0], -4000);
-                    if (!usingDB2Client()) {
-                        fail("FAIL - position with negative start " +
-                                "position should have caused an exception");
-                    }
+                    fail("FAIL - position with negative start " +
+                            "position should have caused an exception");
                 } catch (SQLException e) {
                     checkException(BLOB_BAD_POSITION, e);
-                    assertTrue("FAIL - JCC should not get an exception",
-                            !usingDB2Client());
                 }
                 // null pattern
                 try {
@@ -2277,15 +2267,10 @@ public class BlobClob4BlobTest extends B
                 // 0 or negative position value
                 try {
                     blob.position(blob, -42);
-                    if (!usingDB2Client()) {
-                        fail("FAIL - position with negative start " +
-                                "position should have caused an exception");
-                    }
+                    fail("FAIL - position with negative start " +
+                            "position should have caused an exception");
                 } catch (SQLException e) {
                     checkException(BLOB_BAD_POSITION, e);
-                } catch (ArrayIndexOutOfBoundsException aob) {
-                    assertTrue("FAIL - this excpetion should only happen " +
-                            "with DB2 client", usingDB2Client());
                 }
                 // null pattern
                 try {
@@ -3358,11 +3343,6 @@ public class BlobClob4BlobTest extends B
                     throw e;
                 }
             }
-        } catch (StringIndexOutOfBoundsException obe) {
-            // Known bug.  JCC 5914.
-            if (!((pos > clobLength) && usingDB2Client())) {
-                throw obe;
-            }
         }
     }
 
@@ -3407,10 +3387,6 @@ public class BlobClob4BlobTest extends B
                     throw e;
                 }
             }
-        } catch (NegativeArraySizeException nase) {
-            if (!((pos > blobLength) && usingDB2Client())) {
-                throw nase;
-            }
         }
     }
 
@@ -3521,9 +3497,7 @@ public class BlobClob4BlobTest extends B
     private void checkException(String SQLState, SQLException se)
             throws Exception
     {
-        if (!usingDB2Client()) {
-            assertSQLState(SQLState, se);
-        }
+         assertSQLState(SQLState, se);
     }
 
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ConcurrencyTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ConcurrencyTest.java?rev=1244295&r1=1244294&r2=1244295&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ConcurrencyTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ConcurrencyTest.java
Wed Feb 15 00:53:08 2012
@@ -877,28 +877,23 @@ public class ConcurrencyTest extends SUR
             suite.addTest(new ConcurrencyTest("testSharedLocks1"));
             suite.addTest(new ConcurrencyTest("testSharedAndUpdateLocks1"));
             suite.addTest(new ConcurrencyTest("testSharedAndUpdateLocks2"));
+            suite.addTest(new ConcurrencyTest ("testUpdatePurgedTuple2"));
+            suite.addTest(new ConcurrencyTest("testUpdatePurgedTuple3"));
+            suite.addTest(new ConcurrencyTest("testUpdatePurgedTuple4"));
+            suite.addTest(new ConcurrencyTest("testUpdateModifiedTuple1"));
+            suite.addTest(new ConcurrencyTest("testUpdateModifiedTuple2"));
+            suite.addTest(new ConcurrencyTest("testTableIntentLock1"));
+            suite.addTest
+                (new ConcurrencyTest("testUpdateLockInReadUncommitted"));
+            suite.addTest(new ConcurrencyTest("testDefragmentDuringScan"));
+            suite.addTest(new ConcurrencyTest("testTruncateDuringScan"));
             
-            // The following testcases do use updatable result sets.            
-            if (!usingDB2Client()) { // DB2 client does not support UR with Derby
-                suite.addTest(new ConcurrencyTest ("testUpdatePurgedTuple2"));
-                suite.addTest(new ConcurrencyTest("testUpdatePurgedTuple3"));
-                suite.addTest(new ConcurrencyTest("testUpdatePurgedTuple4"));
-                suite.addTest(new ConcurrencyTest("testUpdateModifiedTuple1"));
-                suite.addTest(new ConcurrencyTest("testUpdateModifiedTuple2"));
-                suite.addTest(new ConcurrencyTest("testTableIntentLock1"));
+            // This testcase fails in DerbyNetClient framework due to 
+            // DERBY-1696
+            if (embedded) {
                 suite.addTest
-                    (new ConcurrencyTest("testUpdateLockInReadUncommitted"));
-                suite.addTest(new ConcurrencyTest("testDefragmentDuringScan"));
-                suite.addTest(new ConcurrencyTest("testTruncateDuringScan"));
-                
-                // This testcase fails in DerbyNetClient framework due to 
-                // DERBY-1696
-                if (embedded) {
-                    suite.addTest
-                        (new ConcurrencyTest("testUpdatePurgedTuple1"));
-                }
-                
-            }         
+                    (new ConcurrencyTest("testUpdatePurgedTuple1"));
+            }        
         }
         
         return suite;

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DriverTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DriverTest.java?rev=1244295&r1=1244294&r2=1244295&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DriverTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DriverTest.java
Wed Feb 15 00:53:08 2012
@@ -292,11 +292,6 @@ public class DriverTest extends BaseJDBC
      */
     public void testEmbeddedAttributes() throws SQLException
     {
-        // JCC can't take embedded attributes in info or as normal url 
-        // attributes, so not tested here.
-        if (usingDB2Client())
-            return;
-        
         String dbName = TestConfiguration.getCurrent().getDefaultDatabaseName();
         String protocol = 
             TestConfiguration.getCurrent().getJDBCClient().getUrlBase();
@@ -516,11 +511,6 @@ public class DriverTest extends BaseJDBC
         if (usingDerbyNetClient())
             protocol = protocol + TestConfiguration.getCurrent().getHostName()
             + ":" + TestConfiguration.getCurrent().getPort() + "/";
-        else if (usingDB2Client())
-            protocol = protocol + "net:" + 
-            TestConfiguration.getCurrent().getHostName() + ":" + 
-            TestConfiguration.getCurrent().getPort() + "/";
-        
         url = protocol + DB_NAME_WITH_SPACES + ";create=true";
         String shuturl = protocol + DB_NAME_WITH_SPACES + ";shutdown=true";
         

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/HoldabilityTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/HoldabilityTest.java?rev=1244295&r1=1244294&r2=1244295&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/HoldabilityTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/HoldabilityTest.java
Wed Feb 15 00:53:08 2012
@@ -36,10 +36,6 @@ public class HoldabilityTest extends SUR
     
     public static Test suite() {
                
-        // DB2 client doesn't support this functionality
-        if (usingDB2Client())
-            return new TestSuite();
-        
         return TestConfiguration.defaultSuite(HoldabilityTest.class);
     }
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ProcedureTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ProcedureTest.java?rev=1244295&r1=1244294&r2=1244295&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ProcedureTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ProcedureTest.java
Wed Feb 15 00:53:08 2012
@@ -113,8 +113,6 @@ public class ProcedureTest extends BaseJ
      * Tests that <code>Statement.executeUpdate()</code> succeeds when
      * no result sets are returned.
      *
-     * <p>Currently, this test fails with JCC.
-     *
      * @exception SQLException if a database error occurs
      */
     public void testExecuteUpdateWithNoDynamicResultSets()
@@ -201,8 +199,6 @@ public class ProcedureTest extends BaseJ
      * Tests that <code>PreparedStatement.executeUpdate()</code>
      * succeeds when no result sets are returned.
      *
-     * <p>Currently, this test fails with JCC.
-     *
      * @exception SQLException if a database error occurs
      */
     public void testExecuteUpdateWithNoDynamicResultSets_prepared()
@@ -219,11 +215,6 @@ public class ProcedureTest extends BaseJ
      * Tests that <code>PreparedStatement.executeUpdate()</code> fails
      * when a result set is returned from a stored procedure.
      *
-     * <p>Currently, this test fails with
-     * JCC. However, the corresponding tests for
-     * <code>Statement</code> and <code>CallableStatement</code>
-     * succeed. Strange...
-     *
      * @exception SQLException if a database error occurs
      */
     public void testExecuteUpdateWithOneDynamicResultSet_prepared()
@@ -300,8 +291,6 @@ public class ProcedureTest extends BaseJ
      * Tests that <code>CallableStatement.executeUpdate()</code>
      * succeeds when no result sets are returned.
      *
-     * <p>Currently, this test fails with JCC.
-     *
      * @exception SQLException if a database error occurs
      */
     public void testExecuteUpdateWithNoDynamicResultSets_callable()
@@ -372,8 +361,6 @@ public class ProcedureTest extends BaseJ
      * <code>executeQuery()</code> are correctly rolled back when the
      * query fails because the number of returned result sets is zero.
      *
-     * <p> This test case fails with JCC.
-     *
      * @exception SQLException if a database error occurs
      */
     public void testRollbackStoredProcWhenExecuteQueryReturnsNothing()
@@ -399,8 +386,6 @@ public class ProcedureTest extends BaseJ
      * query fails because the number of returned result sets is more
      * than one.
      *
-     * <p> This test case fails with JCC.
-     *
      * @exception SQLException if a database error occurs
      */
     public void testRollbackStoredProcWhenExecuteQueryReturnsTooMuch()
@@ -425,8 +410,6 @@ public class ProcedureTest extends BaseJ
      * <code>executeUpdate()</code> are correctly rolled back when the
      * query fails because the stored procedure returned a result set.
      *
-     * <p> This test case fails with JCC.
-     *
      * @exception SQLException if a database error occurs
      */
     public void testRollbackStoredProcWhenExecuteUpdateReturnsResults()
@@ -451,8 +434,6 @@ public class ProcedureTest extends BaseJ
      * <code>executeQuery()</code> are correctly rolled back when the
      * query fails because the number of returned result sets is zero.
      *
-     * <p> This test case fails with JCC.
-     *
      * @exception SQLException if a database error occurs
      */
     public void testRollbackStoredProcWhenExecuteQueryReturnsNothing_prepared()
@@ -481,8 +462,6 @@ public class ProcedureTest extends BaseJ
      * query fails because the number of returned result sets is more
      * than one.
      *
-     * <p> This test case fails with JCC.
-     *
      * @exception SQLException if a database error occurs
      */
     public void testRollbackStoredProcWhenExecuteQueryReturnsTooMuch_prepared()
@@ -509,8 +488,6 @@ public class ProcedureTest extends BaseJ
      * <code>executeUpdate()</code> are correctly rolled back when the
      * query fails because the stored procedure returned a result set.
      *
-     * <p> This test case fails with JCC.
-     *
      * @exception SQLException if a database error occurs
      */
     public void
@@ -847,11 +824,7 @@ public class ProcedureTest extends BaseJ
      * @param sqle a <code>SQLException</code> value
      */
     private void assertNoResultSetFromExecuteQuery(SQLException sqle) {
-        if (usingDB2Client()) {
-            assertNull("Unexpected SQL state.", sqle.getSQLState());
-        } else {
-            assertSQLState("Unexpected SQL state.", "X0Y78", sqle);
-        }
+        assertSQLState("Unexpected SQL state.", "X0Y78", sqle);        
     }
 
     /**
@@ -862,11 +835,7 @@ public class ProcedureTest extends BaseJ
      */
     private void assertMultipleResultsFromExecuteQuery(SQLException sqle)
     {
-        if (usingDB2Client()) {
-            assertNull("Unexpected SQL state.", sqle.getSQLState());
-        } else {
-            assertSQLState("Unexpected SQL state.", "X0Y78", sqle);
-        }
+        assertSQLState("Unexpected SQL state.", "X0Y78", sqle);        
     }
 
     /**
@@ -876,12 +845,7 @@ public class ProcedureTest extends BaseJ
      * @param sqle a <code>SQLException</code> value
      */
     private void assertResultsFromExecuteUpdate(SQLException sqle) {
-        if (usingDB2Client()) {
-            assertNull("Unexpected SQL state.", sqle.getSQLState());
-        } else {
-            assertSQLState("Unexpected SQL state.", "X0Y79", sqle);
-        }
-
+        assertSQLState("Unexpected SQL state.", "X0Y79", sqle);
     }
 
     // SETUP

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetCloseTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetCloseTest.java?rev=1244295&r1=1244294&r2=1244295&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetCloseTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetCloseTest.java
Wed Feb 15 00:53:08 2012
@@ -120,12 +120,6 @@ public class ResultSetCloseTest extends 
      */
     public static Test suite() {
                 
-        // DB2 client doesn't implement result set closing
-        // correctly wrt ensuring all its methods subsequently
-        // throw an exception.
-        if (usingDB2Client())
-            return new TestSuite("empty");
-        
         return TestConfiguration.defaultSuite(ResultSetCloseTest.class);
     }
     

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURQueryMixTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURQueryMixTest.java?rev=1244295&r1=1244294&r2=1244295&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURQueryMixTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURQueryMixTest.java
Wed Feb 15 00:53:08 2012
@@ -542,10 +542,6 @@ public class SURQueryMixTest extends SUR
     {   
         TestSuite mainSuite = new TestSuite("SURQueryMixTest suite");
         
-        // DB2 client doesn't support this functionality
-        if (usingDB2Client())
-            return mainSuite;
-        
         mainSuite.addTest(baseSuite("SURQueryMixTest:embedded"));
         mainSuite.addTest(
                 TestConfiguration.clientServerDecorator(

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURTest.java?rev=1244295&r1=1244294&r2=1244295&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURTest.java
Wed Feb 15 00:53:08 2012
@@ -1741,10 +1741,6 @@ public class SURTest extends SURBaseTest
      */
     public static Test suite() {
         TestSuite mainSuite = new TestSuite("SURTest");
-        // DB2 client doesn't support this functionality
-        if (usingDB2Client())
-            return mainSuite;
-        
         mainSuite.addTest(baseSuite("SURTest:embedded"));
         mainSuite.addTest(
                 TestConfiguration.clientServerDecorator(baseSuite("SURTest:client")));

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ScrollResultSetTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ScrollResultSetTest.java?rev=1244295&r1=1244294&r2=1244295&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ScrollResultSetTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ScrollResultSetTest.java
Wed Feb 15 00:53:08 2012
@@ -124,12 +124,9 @@ public class ScrollResultSetTest extends
             assertTrue("Excepted exception to be thrown - result set is closed", 
                        false);
         } catch (SQLException se) {
-            if (!usingDB2Client()) {
                 assertSQLState("Unexpected SQL State",
                                SQLStateConstants.RESULT_SET_IS_CLOSED, se);
-            }
         }
-
     }
 
     /**

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/UpdatableResultSetTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/UpdatableResultSetTest.java?rev=1244295&r1=1244294&r2=1244295&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/UpdatableResultSetTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/UpdatableResultSetTest.java
Wed Feb 15 00:53:08 2012
@@ -104,12 +104,6 @@ public class UpdatableResultSetTest exte
     /** Create a test suite with all tests in this class. */
     public static Test suite() {
 
-        // Test will fail with JCC.
-        if (usingDB2Client()) {
-            // empty suite
-            return new TestSuite();
-        }
-
         return TestConfiguration.defaultSuite(UpdatableResultSetTest.class);
     }
     

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/UpdateXXXTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/UpdateXXXTest.java?rev=1244295&r1=1244294&r2=1244295&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/UpdateXXXTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/UpdateXXXTest.java
Wed Feb 15 00:53:08 2012
@@ -56,10 +56,6 @@ final public class UpdateXXXTest extends
      */
     public static Test suite() {
         
-        // DB2 client doesn't support this functionality
-        if (usingDB2Client())
-            return new TestSuite("empty");
-        
         TestSuite suite = baseSuite("UpdateXXXTest");
         
         suite.addTest(

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TableFunctionTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TableFunctionTest.java?rev=1244295&r1=1244294&r2=1244295&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TableFunctionTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TableFunctionTest.java
Wed Feb 15 00:53:08 2012
@@ -2197,21 +2197,16 @@ public class TableFunctionTest extends B
         ( String functionName, Object[][] expectedGetFunctionsResult, Object[][] expectedGetFunctionColumnsResult
)
         throws Exception
     {
-        // skip this test if using the DB2 client, which does not support the
-        // JDBC4 metadata calls.
-        if (  usingDB2Client() ) { return; }
+        println( "\nExpecting correct function metadata from " + functionName );
+        ResultSet                   rs = getFunctions(  null, "APP", functionName );
+        JDBC.assertFullResultSet( rs, expectedGetFunctionsResult, false );
+        rs.close();
         
-
-            println( "\nExpecting correct function metadata from " + functionName );
-            ResultSet                   rs = getFunctions(  null, "APP", functionName );
-            JDBC.assertFullResultSet( rs, expectedGetFunctionsResult, false );
-            rs.close();
-            
-            println( "\nExpecting correct function column metadata from " + functionName
);
-            rs = getFunctionColumns(  null, "APP", functionName, "%" );
-            //prettyPrint( getConnection(), getFunctionColumns(  null, "APP", functionName,
"%" ) );
-            JDBC.assertFullResultSet( rs, expectedGetFunctionColumnsResult, false );
-            rs.close();
+        println( "\nExpecting correct function column metadata from " + functionName );
+        rs = getFunctionColumns(  null, "APP", functionName, "%" );
+        //prettyPrint( getConnection(), getFunctionColumns(  null, "APP", functionName, "%"
) );
+        JDBC.assertFullResultSet( rs, expectedGetFunctionColumnsResult, false );
+        rs.close();
     }
 
     /**



Mime
View raw message