You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by mi...@apache.org on 2013/04/13 22:03:37 UTC

svn commit: r1467688 - in /db/derby/code/branches/10.9: ./ java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AutoloadTest.java java/testing/org/apache/derbyTesting/junit/TestConfiguration.java

Author: mikem
Date: Sat Apr 13 20:03:37 2013
New Revision: 1467688

URL: http://svn.apache.org/r1467688
Log:
DERBY-6178 AutoloadTest does not proprogate original jvm -D flags to spawned JVM, leading to LAB regression test failures

backport of change #1467664 from trunk to 10.9 branch.

This change disables the AutoloadTest when a non-default base port is
passed to the test run.  Currently the test does not work correctly
for multiple concurrent runs using different base ports.


Modified:
    db/derby/code/branches/10.9/   (props changed)
    db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AutoloadTest.java
    db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/junit/TestConfiguration.java

Propchange: db/derby/code/branches/10.9/
------------------------------------------------------------------------------
  Merged /db/derby/code/trunk:r1467664

Modified: db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AutoloadTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AutoloadTest.java?rev=1467688&r1=1467687&r2=1467688&view=diff
==============================================================================
--- db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AutoloadTest.java (original)
+++ db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AutoloadTest.java Sat Apr 13 20:03:37 2013
@@ -91,6 +91,7 @@ public class AutoloadTest extends BaseJD
         if (!JDBC.vmSupportsJDBC3())
             return new TestSuite("empty: no java.sql.DriverManager");
 
+
         boolean embeddedAutoLoad = false;
         boolean clientAutoLoad = false;
         boolean jdbc4Autoload = false;
@@ -225,6 +226,21 @@ public class AutoloadTest extends BaseJD
      * </ul>
      */
     static Test fullAutoloadSuite() {
+        if (!TestConfiguration.getCurrent().isDefaultBasePort())
+        {
+            // DERBY-6178
+            //     test is not currently coded to work properly when calling
+            //     system is depending on setting -Dderby.tests.basePort=3500
+            //     to avoid conflict on concurrent tests starting and stopping
+            //     network server.
+
+            // for now just skip this test if tests are setting a non-default
+            // base port.
+            return new TestSuite(
+                    "empty: test not supported with non-default base port: " + 
+                    TestConfiguration.getCurrent().getBasePort());
+        }
+
         TestSuite suite = new TestSuite("AutoloadTest:All");
         suite.addTest(new AutoloadTest(AutoloadTest.class));
         suite.addTest(new AutoloadTest(JDBCDriversEmbeddedTest.class));

Modified: db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/junit/TestConfiguration.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/junit/TestConfiguration.java?rev=1467688&r1=1467687&r2=1467688&view=diff
==============================================================================
--- db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/junit/TestConfiguration.java (original)
+++ db/derby/code/branches/10.9/java/testing/org/apache/derbyTesting/junit/TestConfiguration.java Sat Apr 13 20:03:37 2013
@@ -1551,6 +1551,15 @@ public final class TestConfiguration {
         return hostName;
     }
 
+    /**
+     * Return if the base port is default or not.
+     *
+     * @return true if base port is default.
+     */
+    public static boolean isDefaultBasePort() {
+        return (basePort == DEFAULT_PORT);
+    }
+
     public static int getBasePort() {
         return basePort;
     }