db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject svn commit: r1467683 - in /db/derby/code/branches/10.10: ./ java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AutoloadTest.java java/testing/org/apache/derbyTesting/junit/TestConfiguration.java
Date Sat, 13 Apr 2013 19:47:50 GMT
Author: mikem
Date: Sat Apr 13 19:47:50 2013
New Revision: 1467683

URL: http://svn.apache.org/r1467683
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.10 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.10/   (props changed)
    db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AutoloadTest.java
    db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/junit/TestConfiguration.java

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

Modified: db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AutoloadTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AutoloadTest.java?rev=1467683&r1=1467682&r2=1467683&view=diff
==============================================================================
--- db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AutoloadTest.java
(original)
+++ db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AutoloadTest.java
Sat Apr 13 19:47:50 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.10/java/testing/org/apache/derbyTesting/junit/TestConfiguration.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/junit/TestConfiguration.java?rev=1467683&r1=1467682&r2=1467683&view=diff
==============================================================================
--- db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/junit/TestConfiguration.java
(original)
+++ db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/junit/TestConfiguration.java
Sat Apr 13 19:47:50 2013
@@ -1620,6 +1620,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;
     }



Mime
View raw message