Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 63674 invoked from network); 18 Jul 2008 07:43:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Jul 2008 07:43:26 -0000 Received: (qmail 39914 invoked by uid 500); 18 Jul 2008 07:43:25 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 39879 invoked by uid 500); 18 Jul 2008 07:43:25 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 39870 invoked by uid 99); 18 Jul 2008 07:43:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Jul 2008 00:43:25 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Jul 2008 07:42:40 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id E241623888A6; Fri, 18 Jul 2008 00:43:04 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r677849 - in /db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting: functionTests/tests/derbynet/ functionTests/tests/jdbcapi/ functionTests/tests/lang/ junit/ Date: Fri, 18 Jul 2008 07:43:04 -0000 To: derby-commits@db.apache.org From: kristwaa@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080718074304.E241623888A6@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: kristwaa Date: Fri Jul 18 00:43:02 2008 New Revision: 677849 URL: http://svn.apache.org/viewvc?rev=677849&view=rev Log: DERBY-3763: Rename BaseJDBCTestCase.usingDerbyNet. Merged revision 677848 (derby-3763-1b-usingDB2Client.diff) from trunk. Modified: db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSSecurityMechanismTest.java db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobClob4BlobTest.java db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ConcurrencyTest.java db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DriverTest.java db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/HoldabilityTest.java db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ProcedureTest.java db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetCloseTest.java db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURQueryMixTest.java db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURTest.java db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ScrollResultSetTest.java db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/UpdatableResultSetTest.java db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/UpdateXXXTest.java db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TableFunctionTest.java db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/junit/BaseJDBCTestCase.java db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/junit/JDBCClient.java Modified: db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSSecurityMechanismTest.java URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSSecurityMechanismTest.java?rev=677849&r1=677848&r2=677849&view=diff ============================================================================== --- db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSSecurityMechanismTest.java (original) +++ db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/NSSecurityMechanismTest.java Fri Jul 18 00:43:02 2008 @@ -1275,7 +1275,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/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobClob4BlobTest.java URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobClob4BlobTest.java?rev=677849&r1=677848&r2=677849&view=diff ============================================================================== --- db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobClob4BlobTest.java (original) +++ db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobClob4BlobTest.java Fri Jul 18 00:43:02 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/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ConcurrencyTest.java URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ConcurrencyTest.java?rev=677849&r1=677848&r2=677849&view=diff ============================================================================== --- db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ConcurrencyTest.java (original) +++ db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ConcurrencyTest.java Fri Jul 18 00:43:02 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/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DriverTest.java URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DriverTest.java?rev=677849&r1=677848&r2=677849&view=diff ============================================================================== --- db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DriverTest.java (original) +++ db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DriverTest.java Fri Jul 18 00:43:02 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/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/HoldabilityTest.java URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/HoldabilityTest.java?rev=677849&r1=677848&r2=677849&view=diff ============================================================================== --- db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/HoldabilityTest.java (original) +++ db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/HoldabilityTest.java Fri Jul 18 00:43:02 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/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ProcedureTest.java URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ProcedureTest.java?rev=677849&r1=677848&r2=677849&view=diff ============================================================================== --- db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ProcedureTest.java (original) +++ db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ProcedureTest.java Fri Jul 18 00:43:02 2008 @@ -602,7 +602,7 @@ * @param sqle a SQLException 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 SQLException 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/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetCloseTest.java URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetCloseTest.java?rev=677849&r1=677848&r2=677849&view=diff ============================================================================== --- db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetCloseTest.java (original) +++ db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ResultSetCloseTest.java Fri Jul 18 00:43:02 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/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURQueryMixTest.java URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURQueryMixTest.java?rev=677849&r1=677848&r2=677849&view=diff ============================================================================== --- db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURQueryMixTest.java (original) +++ db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURQueryMixTest.java Fri Jul 18 00:43:02 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/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURTest.java URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURTest.java?rev=677849&r1=677848&r2=677849&view=diff ============================================================================== --- db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURTest.java (original) +++ db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURTest.java Fri Jul 18 00:43:02 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/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ScrollResultSetTest.java URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ScrollResultSetTest.java?rev=677849&r1=677848&r2=677849&view=diff ============================================================================== --- db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ScrollResultSetTest.java (original) +++ db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ScrollResultSetTest.java Fri Jul 18 00:43:02 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/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/UpdatableResultSetTest.java URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/UpdatableResultSetTest.java?rev=677849&r1=677848&r2=677849&view=diff ============================================================================== --- db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/UpdatableResultSetTest.java (original) +++ db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/UpdatableResultSetTest.java Fri Jul 18 00:43:02 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/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/UpdateXXXTest.java URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/UpdateXXXTest.java?rev=677849&r1=677848&r2=677849&view=diff ============================================================================== --- db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/UpdateXXXTest.java (original) +++ db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/UpdateXXXTest.java Fri Jul 18 00:43:02 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/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TableFunctionTest.java URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TableFunctionTest.java?rev=677849&r1=677848&r2=677849&view=diff ============================================================================== --- db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TableFunctionTest.java (original) +++ db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TableFunctionTest.java Fri Jul 18 00:43:02 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/branches/10.4/java/testing/org/apache/derbyTesting/junit/BaseJDBCTestCase.java URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/junit/BaseJDBCTestCase.java?rev=677849&r1=677848&r2=677849&view=diff ============================================================================== --- db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/junit/BaseJDBCTestCase.java (original) +++ db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/junit/BaseJDBCTestCase.java Fri Jul 18 00:43:02 2008 @@ -576,12 +576,12 @@ } /** - * Tell if the client is DerbyNet. + * Tell if the client is DB2Client. * - * @return true if using the DerbyNet client + * @return true if using the DB2 client driver, * false otherwise. */ - public static boolean usingDerbyNet() { + public static boolean usingDB2Client() { return TestConfiguration.getCurrent().getJDBCClient().isDB2Client(); } @@ -761,7 +761,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 @@ -829,7 +829,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/branches/10.4/java/testing/org/apache/derbyTesting/junit/JDBCClient.java URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/junit/JDBCClient.java?rev=677849&r1=677848&r2=677849&view=diff ============================================================================== --- db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/junit/JDBCClient.java (original) +++ db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/junit/JDBCClient.java Fri Jul 18 00:43:02 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://");