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 ka...@apache.org on 2013/03/07 10:41:39 UTC
svn commit: r1453748 - in
/db/derby/code/trunk/java/testing/org/apache/derbyTesting:
functionTests/tests/compatibility/VersionCombinationConfigurator.java
junit/DerbyVersion.java
Author: kahatlen
Date: Thu Mar 7 09:41:38 2013
New Revision: 1453748
URL: http://svn.apache.org/r1453748
Log:
DERBY-6098: Skip compatibility testing of old servers on compact profile 2
Modified:
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/compatibility/VersionCombinationConfigurator.java
db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/DerbyVersion.java
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/compatibility/VersionCombinationConfigurator.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/compatibility/VersionCombinationConfigurator.java?rev=1453748&r1=1453747&r2=1453748&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/compatibility/VersionCombinationConfigurator.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/compatibility/VersionCombinationConfigurator.java Thu Mar 7 09:41:38 2013
@@ -37,6 +37,7 @@ import org.apache.derby.tools.sysinfo;
import org.apache.derbyTesting.junit.BaseTestCase;
import org.apache.derbyTesting.junit.DerbyDistribution;
import org.apache.derbyTesting.junit.DerbyVersion;
+import org.apache.derbyTesting.junit.JDBC;
import org.apache.derbyTesting.junit.TestConfiguration;
/**
@@ -171,6 +172,12 @@ public class VersionCombinationConfigura
// Generate a list of all the combinations.
for (DerbyDistribution server : dists) {
DerbyVersion serverVersion = server.getVersion();
+
+ // Check if testing of this server version should be skipped.
+ if (skipServerVersion(serverVersion)) {
+ continue;
+ }
+
TestSuite clientSuites = new TestSuite(
"Client runs against server " + serverVersion.toString());
for (DerbyDistribution client : dists) {
@@ -203,6 +210,29 @@ public class VersionCombinationConfigura
}
/**
+ * Check if a certain server version should be skipped due to bugs that
+ * prevent it from working in the current environment.
+ *
+ * @param version the server version to check
+ * @return {@code true} if the specified version should be skipped, or
+ * {@code false} otherwise
+ */
+ private boolean skipServerVersion(DerbyVersion version) {
+
+ // DERBY-6098: Skip testing of server versions less than 10.10 if
+ // the JVM doesn't support JNDI. Earlier versions of the server don't
+ // accept connections if JNDI is not present.
+ if (!JDBC.vmSupportsJNDI() && version.lessThan(DerbyVersion._10_10)) {
+ println("Server version " + version + " was skipped because " +
+ "it requires JNDI to run.");
+ return true;
+ }
+
+ // Default: don't skip
+ return false;
+ }
+
+ /**
* Filters Derby distributions available in the distribution repository.
*
* @return A list of available and accepted Derby distributions.
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/DerbyVersion.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/DerbyVersion.java?rev=1453748&r1=1453747&r2=1453748&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/DerbyVersion.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/DerbyVersion.java Thu Mar 7 09:41:38 2013
@@ -41,6 +41,7 @@ public class DerbyVersion
public static final DerbyVersion _10_7 = new DerbyVersion(10,7,0,0);
public static final DerbyVersion _10_8 = new DerbyVersion(10,8,0,0);
public static final DerbyVersion _10_9 = new DerbyVersion(10,9,0,0);
+ public static final DerbyVersion _10_10 = new DerbyVersion(10,10,0,0);
// A list of all known official Derby releases.