db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krist...@apache.org
Subject svn commit: r677848 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting: functionTests/tests/derbynet/ functionTests/tests/jdbcapi/ functionTests/tests/lang/ junit/
Date Fri, 18 Jul 2008 07:40:13 GMT
Author: kristwaa
Date: Fri Jul 18 00:40:12 2008
New Revision: 677848

URL: http://svn.apache.org/viewvc?rev=677848&view=rev
Log:
DERBY-3763: Rename BaseJDBCTestCase.usingDerbyNet.
Renamed to usingDB2Client.
Patch file: derby-3763-1b-usingDB2Client.diff

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
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/BaseJDBCTestCase.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCClient.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=677848&r1=677847&r2=677848&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
Fri Jul 18 00:40:12 2008
@@ -1243,7 +1243,7 @@
     {
         String hostName = TestConfiguration.DEFAULT_HOSTNAME;
         int port = TestConfiguration.DEFAULT_PORT;
-        if (usingDerbyNet())
+        if (usingDB2Client())
         {
             //attrs.put("retrieveMessagesFromServerOnGetMessage","true");
             attrs.put("driverType","4");

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=677848&r1=677847&r2=677848&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
Fri Jul 18 00:40:12 2008
@@ -857,8 +857,8 @@
         }  catch (SQLException e) {
             checkException(BLOB_POSITION_TOO_LARGE, e);
         } catch (StringIndexOutOfBoundsException se) {
-            assertTrue("FAIL - This exception should only happen with DerbyNet",
-                    usingDerbyNet());
+            assertTrue("FAIL - This exception should only happen with " +
+                    "DB2 client", usingDB2Client());
         }
         // 0 or negative position value
         try {
@@ -2161,19 +2161,19 @@
                     checkException(BLOB_POSITION_TOO_LARGE, e);
                 } catch (NegativeArraySizeException nase) {
                     assertTrue("FAIL - this exception should only happen " +
-                            "with DerbyNet", usingDerbyNet());
+                            "with DB2 client", usingDB2Client());
                 }
                 // 0 or negative position value
                 try {
                     blob.position(new byte[0], -4000);
-                    if (!usingDerbyNet()) {
+                    if (!usingDB2Client()) {
                         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",
-                            !usingDerbyNet());
+                            !usingDB2Client());
                 }
                 // null pattern
                 try {
@@ -2186,7 +2186,7 @@
                 // 0 or negative position value
                 try {
                     blob.position(blob, -42);
-                    if (!usingDerbyNet()) {
+                    if (!usingDB2Client()) {
                         fail("FAIL - position with negative start " +
                                 "position should have caused an exception");
                     }
@@ -2194,7 +2194,7 @@
                     checkException(BLOB_BAD_POSITION, e);
                 } catch (ArrayIndexOutOfBoundsException aob) {
                     assertTrue("FAIL - this excpetion should only happen " +
-                            "with DerbyNet", usingDerbyNet());
+                            "with DB2 client", usingDB2Client());
                 }
                 // null pattern
                 try {
@@ -3218,7 +3218,7 @@
             }
         } catch (StringIndexOutOfBoundsException obe) {
             // Known bug.  JCC 5914.
-            if (!((pos > clobLength) && usingDerbyNet())) {
+            if (!((pos > clobLength) && usingDB2Client())) {
                 throw obe;
             }
         }
@@ -3266,7 +3266,7 @@
                 }
             }
         } catch (NegativeArraySizeException nase) {
-            if (!((pos > blobLength) && usingDerbyNet())) {
+            if (!((pos > blobLength) && usingDB2Client())) {
                 throw nase;
             }
         }
@@ -3379,7 +3379,7 @@
     private void checkException(String SQLState, SQLException se)
             throws Exception
     {
-        if (!usingDerbyNet()) {
+        if (!usingDB2Client()) {
             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=677848&r1=677847&r2=677848&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
Fri Jul 18 00:40:12 2008
@@ -879,7 +879,7 @@
             suite.addTest(new ConcurrencyTest("testSharedAndUpdateLocks2"));
             
             // The following testcases do use updatable result sets.            
-            if (!usingDerbyNet()) { // DB2 client does not support UR with Derby
+            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"));

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=677848&r1=677847&r2=677848&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
Fri Jul 18 00:40:12 2008
@@ -289,7 +289,7 @@
     {
         // JCC can't take embedded attributes in info or as normal url 
         // attributes, so not tested here.
-        if (usingDerbyNet())
+        if (usingDB2Client())
             return;
         
         String dbName = TestConfiguration.getCurrent().getDefaultDatabaseName();
@@ -511,7 +511,7 @@
         if (usingDerbyNetClient())
             protocol = protocol + TestConfiguration.getCurrent().getHostName()
             + ":" + TestConfiguration.getCurrent().getPort() + "/";
-        else if (usingDerbyNet())
+        else if (usingDB2Client())
             protocol = protocol + "net:" + 
             TestConfiguration.getCurrent().getHostName() + ":" + 
             TestConfiguration.getCurrent().getPort() + "/";

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=677848&r1=677847&r2=677848&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
Fri Jul 18 00:40:12 2008
@@ -37,7 +37,7 @@
     public static Test suite() {
                
         // DB2 client doesn't support this functionality
-        if (usingDerbyNet())
+        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=677848&r1=677847&r2=677848&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
Fri Jul 18 00:40:12 2008
@@ -602,7 +602,7 @@
      * @param sqle a <code>SQLException</code> value
      */
     private void assertNoResultSetFromExecuteQuery(SQLException sqle) {
-        if (usingDerbyNet()) {
+        if (usingDB2Client()) {
             assertNull("Unexpected SQL state.", sqle.getSQLState());
         } else {
             assertSQLState("Unexpected SQL state.", "X0Y78", sqle);
@@ -617,7 +617,7 @@
      */
     private void assertMultipleResultsFromExecuteQuery(SQLException sqle)
     {
-        if (usingDerbyNet()) {
+        if (usingDB2Client()) {
             assertNull("Unexpected SQL state.", sqle.getSQLState());
         } else {
             assertSQLState("Unexpected SQL state.", "X0Y78", sqle);
@@ -631,7 +631,7 @@
      * @param sqle a <code>SQLException</code> value
      */
     private void assertResultsFromExecuteUpdate(SQLException sqle) {
-        if (usingDerbyNet()) {
+        if (usingDB2Client()) {
             assertNull("Unexpected SQL state.", sqle.getSQLState());
         } else {
             assertSQLState("Unexpected SQL state.", "X0Y79", sqle);

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=677848&r1=677847&r2=677848&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
Fri Jul 18 00:40:12 2008
@@ -123,7 +123,7 @@
         // DB2 client doesn't implement result set closing
         // correctly wrt ensuring all its methods subsequently
         // throw an exception.
-        if (usingDerbyNet())
+        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=677848&r1=677847&r2=677848&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
Fri Jul 18 00:40:12 2008
@@ -543,7 +543,7 @@
         TestSuite mainSuite = new TestSuite("SURQueryMixTest suite");
         
         // DB2 client doesn't support this functionality
-        if (usingDerbyNet())
+        if (usingDB2Client())
             return mainSuite;
         
         mainSuite.addTest(baseSuite("SURQueryMixTest:embedded"));

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=677848&r1=677847&r2=677848&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
Fri Jul 18 00:40:12 2008
@@ -1582,7 +1582,7 @@
     public static Test suite() {
         TestSuite mainSuite = new TestSuite("SURTest");
         // DB2 client doesn't support this functionality
-        if (usingDerbyNet())
+        if (usingDB2Client())
             return mainSuite;
         
         mainSuite.addTest(baseSuite("SURTest:embedded"));

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=677848&r1=677847&r2=677848&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
Fri Jul 18 00:40:12 2008
@@ -124,7 +124,7 @@
             assertTrue("Excepted exception to be thrown - result set is closed", 
                        false);
         } catch (SQLException se) {
-            if (!usingDerbyNet()) {
+            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=677848&r1=677847&r2=677848&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
Fri Jul 18 00:40:12 2008
@@ -105,7 +105,7 @@
     public static Test suite() {
 
         // Test will fail with JCC.
-        if (usingDerbyNet()) {
+        if (usingDB2Client()) {
             // empty suite
             return new TestSuite();
         }

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=677848&r1=677847&r2=677848&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
Fri Jul 18 00:40:12 2008
@@ -57,7 +57,7 @@
     public static Test suite() {
         
         // DB2 client doesn't support this functionality
-        if (usingDerbyNet())
+        if (usingDB2Client())
             return new TestSuite("empty");
         
         TestSuite suite = baseSuite("UpdateXXXTest");

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=677848&r1=677847&r2=677848&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
Fri Jul 18 00:40:12 2008
@@ -1838,7 +1838,7 @@
     {
         // skip this test if using the DB2 client, which does not support the
         // JDBC4 metadata calls.
-        if (  usingDerbyNet() ) { return; }
+        if (  usingDB2Client() ) { return; }
         
 
             println( "\nExpecting correct function metadata from " + functionName );

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/BaseJDBCTestCase.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/BaseJDBCTestCase.java?rev=677848&r1=677847&r2=677848&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/BaseJDBCTestCase.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/BaseJDBCTestCase.java Fri
Jul 18 00:40:12 2008
@@ -584,12 +584,12 @@
     }
     
     /**
-    * Tell if the client is DerbyNet.
+    * Tell if the client is DB2Client.
     *
-    * @return <code>true</code> if using the DerbyNet client
+    * @return <code>true</code> if using the DB2 client driver,
     *         <code>false</code> otherwise.
     */
-    public static boolean usingDerbyNet() {
+    public static boolean usingDB2Client() {
         return TestConfiguration.getCurrent().getJDBCClient().isDB2Client();
     }
     
@@ -769,7 +769,7 @@
                 // Some VMs don't support initCause(). It is OK if they fail.
             }
 
-            if (usingDerbyNet())
+            if (usingDB2Client())
             {
                 /* For JCC the error message is a series of tokens representing
                  * different things like SQLSTATE, SQLCODE, nested SQL error
@@ -837,7 +837,7 @@
 
         try {
             PreparedStatement pSt = prepareStatement(sql);
-            if (usingDerbyNet())
+            if (usingDB2Client())
             {
                 /* For JCC the prepares are deferred until execution,
                  * so we have to actually execute in order to see the

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCClient.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCClient.java?rev=677848&r1=677847&r2=677848&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCClient.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCClient.java Fri Jul
18 00:40:12 2008
@@ -104,11 +104,11 @@
 
     /**
      * The DB2 Universal JDBC network client.
-     * AKA: JCC or DerbyNet.
-     * (the "old net" client for Derby).
+     * AKA: JCC or DB2 client (was called DerbyNet earlier, the "old net"
+     * client for Derby).
      */
     static final JDBCClient DB2CLIENT= new JDBCClient(
-            "DerbyNet",
+            "DB2Client",
             "com.ibm.db2.jcc.DB2Driver",
             null, null, null,
             "jdbc:derby:net://");



Mime
View raw message