db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bpendle...@apache.org
Subject svn commit: r883000 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting: functionTests/tests/jdbcapi/ functionTests/tests/lang/ functionTests/tests/memory/ functionTests/tests/store/ junit/
Date Sat, 21 Nov 2009 21:40:37 GMT
Author: bpendleton
Date: Sat Nov 21 21:40:36 2009
New Revision: 883000

URL: http://svn.apache.org/viewvc?rev=883000&view=rev
Log:
DERBY-2024: Remove JUnit utility method JDBC.vmSupportsJDBC2

Current versions of Derby require a minimum of either JDBC3 or JSR169, so
we no longer need the utility method vmSupportsJDBC2.

This change removes the unneeded method, and replaces the calls to it with
calls to vmSupportsJDBC3.


Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AutoloadTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DatabaseMetaDataTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMappingTest.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/VTITest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/memory/ConnectionHandlingJunit.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/BootAllTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCClient.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/TestConfiguration.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AutoloadTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AutoloadTest.java?rev=883000&r1=882999&r2=883000&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AutoloadTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AutoloadTest.java
Sat Nov 21 21:40:36 2009
@@ -56,7 +56,7 @@
      * See class desciption for details.
      */
     public static Test suite() {
-        if (!JDBC.vmSupportsJDBC2())
+        if (!JDBC.vmSupportsJDBC3())
             return new TestSuite("empty: no java.sql.DriverManager");
 
         boolean embeddedAutoLoad = false;

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DatabaseMetaDataTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DatabaseMetaDataTest.java?rev=883000&r1=882999&r2=883000&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DatabaseMetaDataTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DatabaseMetaDataTest.java
Sat Nov 21 21:40:36 2009
@@ -700,12 +700,12 @@
         } catch (NoSuchMethodError e) {
             // JSR 169 - method must not be there!
             assertTrue("getURL not supported", JDBC.vmSupportsJSR169());
-            assertFalse("getURL not supported", JDBC.vmSupportsJDBC2());
+            assertFalse("getURL not supported", JDBC.vmSupportsJDBC3());
             return;
         }
         
         assertFalse("getURL is supported!", JDBC.vmSupportsJSR169());
-        assertTrue("getURL is supported!", JDBC.vmSupportsJDBC2());
+        assertTrue("getURL is supported!", JDBC.vmSupportsJDBC3());
         
         assertEquals("getURL match",
                 getTestConfiguration().getJDBCUrl(),

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMappingTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMappingTest.java?rev=883000&r1=882999&r2=883000&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMappingTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ParameterMappingTest.java
Sat Nov 21 21:40:36 2009
@@ -367,7 +367,7 @@
     public void testDerby2073() throws Exception
     {
         // Cannot use setBigDecimal with J2ME
-        if (!JDBC.vmSupportsJDBC2())
+        if (!JDBC.vmSupportsJDBC3())
             return;
         
         
@@ -1238,7 +1238,7 @@
                 worked = false;
             }
             rs.close();
-            if (JDBC.vmSupportsJDBC2())
+            if (JDBC.vmSupportsJDBC3())
                 judge_getXXX(worked, sqleResult, 18, type);
         }
 
@@ -2752,7 +2752,7 @@
                     // JSR169
                 }
 
-                if (JDBC.vmSupportsJDBC2()) {
+                if (JDBC.vmSupportsJDBC3()) {
                     psi.executeUpdate();
                     getValidValue(psq, jdbcTypes[type], "setUnicodeStream");
                 }
@@ -2762,7 +2762,7 @@
                 sqleResult = sqle;
                 worked = false;
             }
-            if (JDBC.vmSupportsJDBC2())
+            if (JDBC.vmSupportsJDBC3())
                 judge_setXXX(worked, sqleResult, 14, type);
         }
 
@@ -3717,7 +3717,7 @@
     public static Test suite() {
         
         // Don't run for JSR169 until DERBY-2403 is resolved.
-        if (JDBC.vmSupportsJDBC2())
+        if (JDBC.vmSupportsJDBC3())
             return TestConfiguration.defaultSuite(ParameterMappingTest.class);
         else
             return  new TestSuite("ParameterMapping");

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=883000&r1=882999&r2=883000&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
Sat Nov 21 21:40:36 2009
@@ -79,7 +79,7 @@
         suite.addTestSuite(UpdateXXXTest.class);
         
         // requires java.math.BigDecimal
-        if (JDBC.vmSupportsJDBC2())
+        if (JDBC.vmSupportsJDBC3())
             suite.addTest(new UpdateXXXTest("jdbc2testUpdateBigDecimal"));
                       
         return suite;

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/VTITest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/VTITest.java?rev=883000&r1=882999&r2=883000&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/VTITest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/VTITest.java
Sat Nov 21 21:40:36 2009
@@ -41,7 +41,7 @@
      {
          TestSuite suite = new TestSuite("VTITest");
          // requires DriverManager support
-         if (JDBC.vmSupportsJDBC2()) {
+         if (JDBC.vmSupportsJDBC3()) {
             suite.addTest(new VTITest("bulkInsertVtiTest", "WAREHOUSE"));
             // Run the same test again, but now insert into a table whose name
             // contains single and double quote characters (DERBY-3682)

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/memory/ConnectionHandlingJunit.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/memory/ConnectionHandlingJunit.java?rev=883000&r1=882999&r2=883000&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/memory/ConnectionHandlingJunit.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/memory/ConnectionHandlingJunit.java
Sat Nov 21 21:40:36 2009
@@ -80,7 +80,7 @@
         TestSuite suite = new TestSuite("ConnectionHandlingJUnit");
         
         // Only support for java.sql.DriverManager has been implemented.
-        if (JDBC.vmSupportsJDBC2()) {
+        if (JDBC.vmSupportsJDBC3()) {
             /* driverMgrTestConnectionsToNonexistentDb:
              * Only support for DriverManager (JDBC2 and above) for now, for
              * simplicity (connecting to DB and possibly also loading the driver

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/BootAllTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/BootAllTest.java?rev=883000&r1=882999&r2=883000&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/BootAllTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/BootAllTest.java
Sat Nov 21 21:40:36 2009
@@ -59,7 +59,7 @@
         TestSuite suite = new TestSuite("BootAllTest");
         
         // Test uses driver manager so JDBC 2 required.
-        if (JDBC.vmSupportsJDBC2())
+        if (JDBC.vmSupportsJDBC3())
         {           
             // Suite to create the third (inner) database and
             // perform the actual test (will be run last)

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java?rev=883000&r1=882999&r2=883000&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBC.java Sat Nov 21 21:40:36
2009
@@ -162,17 +162,6 @@
 	}
 
 	/**
- 	 * <p>
-	 * Return true if the virtual machine environment
-	 * supports JDBC2 or later.
-	 * </p>
-	 */
-	public static boolean vmSupportsJDBC2()
-	{
-		return HAVE_DRIVER;
-	}
-
-	/**
 	 * Return true if the virtual machine environment
 	 * supports JSR169. JSR169 is a subset of JDBC 3
      * and hence a subset of JDBC 4 as well.

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=883000&r1=882999&r2=883000&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 Sat Nov
21 21:40:36 2009
@@ -68,7 +68,7 @@
     {
         if (JDBC.vmSupportsJDBC4())
             return EMBEDDED_40;
-        if (JDBC.vmSupportsJDBC2())
+        if (JDBC.vmSupportsJDBC3())
             return EMBEDDED_30;
         if (JDBC.vmSupportsJSR169())
             return EMBEDDED_169;

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/TestConfiguration.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/TestConfiguration.java?rev=883000&r1=882999&r2=883000&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/TestConfiguration.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/TestConfiguration.java
Sat Nov 21 21:40:36 2009
@@ -1159,7 +1159,7 @@
      * @return JDBC connection url, without attributes.
      */
     private String createJDBCUrlWithDatabaseName(String name) {
-        if (JDBC.vmSupportsJDBC2())
+        if (JDBC.vmSupportsJDBC3())
         {
             String url;
            if (jdbcClient.isEmbedded()) {
@@ -1194,7 +1194,7 @@
                 Assert.fail(e.getMessage());
             }            
         }
-        else if (JDBC.vmSupportsJDBC2())
+        else if (JDBC.vmSupportsJDBC3())
         {
             try {
                 connector = (Connector) Class.forName(



Mime
View raw message