You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ji...@apache.org on 2018/10/12 15:27:46 UTC

[geode] branch develop updated: GEODE-5821: exclude geode 1.4 when testing with java 9+ (#2576)

This is an automated email from the ASF dual-hosted git repository.

jinmeiliao pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new 2667fb4  GEODE-5821: exclude geode 1.4 when testing with java 9+ (#2576)
2667fb4 is described below

commit 2667fb48fc02b702d5b26e35525acd1c4e1a98e3
Author: jinmeiliao <ji...@pivotal.io>
AuthorDate: Fri Oct 12 08:27:35 2018 -0700

    GEODE-5821: exclude geode 1.4 when testing with java 9+ (#2576)
---
 .../apache/geode/test/dunit/standalone/VersionManager.java | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/geode-junit/src/main/java/org/apache/geode/test/dunit/standalone/VersionManager.java b/geode-junit/src/main/java/org/apache/geode/test/dunit/standalone/VersionManager.java
index 942a939..c637faa 100755
--- a/geode-junit/src/main/java/org/apache/geode/test/dunit/standalone/VersionManager.java
+++ b/geode-junit/src/main/java/org/apache/geode/test/dunit/standalone/VersionManager.java
@@ -26,6 +26,8 @@ import java.util.Optional;
 import java.util.Properties;
 import java.util.function.BiConsumer;
 
+import org.apache.commons.lang.SystemUtils;
+
 /**
  * VersionManager loads the class-paths for all of the releases of Geode configured for
  * backward-compatibility testing in the geode-core build.gradle file.
@@ -136,8 +138,16 @@ public class VersionManager {
     readVersionsFile(fileName, (version, path) -> {
       Optional<String> parsedVersion = parseVersion(version);
       if (parsedVersion.isPresent()) {
-        classPaths.put(parsedVersion.get(), path);
-        testVersions.add(parsedVersion.get());
+        if (parsedVersion.get().equals("140") && SystemUtils.isJavaVersionAtLeast(900)) {
+          // Serialization filtering was added in 140, but the support for them in java 9+ was added
+          // in 150. As a result, 140 servers and clients will fail categorically when run in
+          // Java 9+ even with the additional libs (jaxb and activation) in the classpath
+          System.err.println(
+              "Geode version 140 is incompatible with Java 9 and higher.  Skipping this version.");
+        } else {
+          classPaths.put(parsedVersion.get(), path);
+          testVersions.add(parsedVersion.get());
+        }
       }
     });
     Collections.sort(testVersions);