geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aba...@apache.org
Subject [50/58] [abbrv] geode git commit: Revert "GEODE-3139 remove current artifacts from classpath of backward-compatibility tests"
Date Mon, 17 Jul 2017 18:06:59 GMT
Revert "GEODE-3139 remove current artifacts from classpath of backward-compatibility tests"

This reverts commit 84bf7394aaa13cc2da4b20b33c1242348b69f7ea.

This revision may have caused CI failures.  I'm reverting it now
just in case.


Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/9f55eb12
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/9f55eb12
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/9f55eb12

Branch: refs/heads/master
Commit: 9f55eb12551488ca77cfb2a11283cf8f33657938
Parents: 38d49a8
Author: Bruce Schuchardt <bschuchardt@pivotal.io>
Authored: Fri Jun 30 15:29:11 2017 -0700
Committer: Bruce Schuchardt <bschuchardt@pivotal.io>
Committed: Fri Jun 30 15:29:11 2017 -0700

----------------------------------------------------------------------
 .../cache/internal/JUnit3CacheTestCase.java     |  2 +-
 .../cache/internal/JUnit4CacheTestCase.java     |  2 +-
 .../geode/test/dunit/standalone/ChildVM.java    |  4 +--
 .../test/dunit/standalone/ProcessManager.java   | 37 ++++----------------
 4 files changed, 10 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/9f55eb12/geode-core/src/test/java/org/apache/geode/test/dunit/cache/internal/JUnit3CacheTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/cache/internal/JUnit3CacheTestCase.java
b/geode-core/src/test/java/org/apache/geode/test/dunit/cache/internal/JUnit3CacheTestCase.java
index 73d4042..917361f 100644
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/cache/internal/JUnit3CacheTestCase.java
+++ b/geode-core/src/test/java/org/apache/geode/test/dunit/cache/internal/JUnit3CacheTestCase.java
@@ -101,7 +101,7 @@ public abstract class JUnit3CacheTestCase extends JUnit3DistributedTestCase
    *
    * @since GemFire 6.5
    */
-  public final ClientCache getClientCache(final ClientCacheFactory factory) {
+  public final InternalClientCache getClientCache(final ClientCacheFactory factory) {
     return delegate.getClientCache(factory);
   }
 

http://git-wip-us.apache.org/repos/asf/geode/blob/9f55eb12/geode-core/src/test/java/org/apache/geode/test/dunit/cache/internal/JUnit4CacheTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/cache/internal/JUnit4CacheTestCase.java
b/geode-core/src/test/java/org/apache/geode/test/dunit/cache/internal/JUnit4CacheTestCase.java
index bf77be3..8629749 100644
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/cache/internal/JUnit4CacheTestCase.java
+++ b/geode-core/src/test/java/org/apache/geode/test/dunit/cache/internal/JUnit4CacheTestCase.java
@@ -290,7 +290,7 @@ public abstract class JUnit4CacheTestCase extends JUnit4DistributedTestCase
    *
    * @since GemFire 6.5
    */
-  public final ClientCache getClientCache(final ClientCacheFactory factory) {
+  public final InternalClientCache getClientCache(final ClientCacheFactory factory) {
     synchronized (JUnit4CacheTestCase.class) {
       final GemFireCacheImpl gemFireCache = GemFireCacheImpl.getInstance();
       if (gemFireCache != null && !gemFireCache.isClosed()

http://git-wip-us.apache.org/repos/asf/geode/blob/9f55eb12/geode-core/src/test/java/org/apache/geode/test/dunit/standalone/ChildVM.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/standalone/ChildVM.java
b/geode-core/src/test/java/org/apache/geode/test/dunit/standalone/ChildVM.java
index d54f3d0..634e09f 100644
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/standalone/ChildVM.java
+++ b/geode-core/src/test/java/org/apache/geode/test/dunit/standalone/ChildVM.java
@@ -17,7 +17,6 @@ package org.apache.geode.test.dunit.standalone;
 import java.rmi.Naming;
 
 import org.apache.geode.internal.OSProcess;
-import org.apache.geode.internal.Version;
 import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.test.dunit.VM;
 import org.apache.geode.test.dunit.internal.JUnit4DistributedTestCase;
@@ -49,8 +48,7 @@ public class ChildVM {
       int pid = OSProcess.getId();
       logger.info("VM" + vmNum + " is launching" + (pid > 0 ? " with PID " + pid : ""));
       if (!VersionManager.isCurrentVersion(geodeVersion)) {
-        logger.info("This VM is using Geode version {}. Version.CURRENT is {}", geodeVersion,
-            Version.CURRENT);
+        logger.info("This VM is using Geode version {}", geodeVersion);
       }
       MasterRemote holder = (MasterRemote) Naming
           .lookup("//localhost:" + namingPort + "/" + DUnitLauncher.MASTER_PARAM);

http://git-wip-us.apache.org/repos/asf/geode/blob/9f55eb12/geode-core/src/test/java/org/apache/geode/test/dunit/standalone/ProcessManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/test/dunit/standalone/ProcessManager.java
b/geode-core/src/test/java/org/apache/geode/test/dunit/standalone/ProcessManager.java
index 9e62484..21b79e8 100755
--- a/geode-core/src/test/java/org/apache/geode/test/dunit/standalone/ProcessManager.java
+++ b/geode-core/src/test/java/org/apache/geode/test/dunit/standalone/ProcessManager.java
@@ -172,32 +172,11 @@ public class ProcessManager {
   private String[] buildJavaCommand(int vmNum, int namingPort, String version) {
     String cmd = System.getProperty("java.home") + File.separator + "bin" + File.separator
+ "java";
     String dunitClasspath = System.getProperty("java.class.path");
-    String separator = File.separator;
     String classPath;
-    if (VersionManager.isCurrentVersion(version)) {
-      classPath = dunitClasspath;
-    } else {
-      // remove current-version product classes and resources from the classpath
-      String buildDir = separator + "geode-core" + separator + "build" + separator;
-
-      String mainClasses = buildDir + "classes" + separator + "main";
-      dunitClasspath = removeFromPath(dunitClasspath, mainClasses);
-
-      String mainResources = buildDir + "resources" + separator + "main";
-      dunitClasspath = removeFromPath(dunitClasspath, mainResources);
-
-      String generatedResources = buildDir + "generated-resources" + separator + "main";
-      dunitClasspath = removeFromPath(dunitClasspath, generatedResources);
-
-      buildDir = separator + "geode-common" + separator + "build" + separator + "classes"
-          + separator + "main";
-      dunitClasspath = removeFromPath(dunitClasspath, buildDir);
-
-      buildDir = separator + "geode-json" + separator + "build" + separator + "classes" +
separator
-          + "main";
-      dunitClasspath = removeFromPath(dunitClasspath, buildDir);
-
+    if (!VersionManager.isCurrentVersion(version)) {
       classPath = versionManager.getClasspath(version) + File.pathSeparator + dunitClasspath;
+    } else {
+      classPath = dunitClasspath;
     }
 
     // String tmpDir = System.getProperty("java.io.tmpdir");
@@ -213,8 +192,7 @@ public class ProcessManager {
     ArrayList<String> cmds = new ArrayList<String>();
     cmds.add(cmd);
     cmds.add("-classpath");
-    String jreLib = separator + "jre" + separator + "lib" + separator;
-    classPath = removeFromPath(classPath, jreLib);
+    classPath = removeJREJars(classPath);
     cmds.add(classPath);
     cmds.add("-D" + DUnitLauncher.RMI_PORT_PARAM + "=" + namingPort);
     cmds.add("-D" + DUnitLauncher.VM_NUM_PARAM + "=" + vmNum);
@@ -230,8 +208,6 @@ public class ProcessManager {
       // detection should create a separate locator that has it enabled
       cmds.add(
           "-D" + DistributionConfig.GEMFIRE_PREFIX + ENABLE_NETWORK_PARTITION_DETECTION +
"=false");
-      cmds.add(
-          "-D" + DistributionConfig.GEMFIRE_PREFIX + "allow_old_members_to_join_for_testing=true");
     }
     cmds.add("-D" + LOG_LEVEL + "=" + DUnitLauncher.logLevel);
     if (DUnitLauncher.LOG4J != null) {
@@ -257,12 +233,13 @@ public class ProcessManager {
     return rst;
   }
 
-  private String removeFromPath(String classpath, String partialPath) {
+  private String removeJREJars(String classpath) {
     String[] jars = classpath.split(File.pathSeparator);
     StringBuilder sb = new StringBuilder(classpath.length());
+    String jreLib = File.separator + "jre" + File.separator + "lib" + File.separator;
     Boolean firstjar = true;
     for (String jar : jars) {
-      if (!jar.contains(partialPath)) {
+      if (!jar.contains(jreLib)) {
         if (!firstjar) {
           sb.append(File.pathSeparator);
         }


Mime
View raw message