geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aba...@apache.org
Subject [52/58] [abbrv] geode git commit: GEODE-3139: Fixing compilation errors
Date Mon, 17 Jul 2017 18:07:01 GMT
GEODE-3139: Fixing compilation errors

ProcessManager appears to have been screwed up in the merge from
develop. Changed the class so that it matches the contents on develop.


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

Branch: refs/heads/master
Commit: 00a066b6ba1a17df99039fe09b742c537a283e30
Parents: 30e2eb2
Author: Dan Smith <upthewaterspout@apache.org>
Authored: Mon Jul 3 15:31:34 2017 -0700
Committer: Dan Smith <upthewaterspout@apache.org>
Committed: Mon Jul 3 15:31:34 2017 -0700

----------------------------------------------------------------------
 .../test/dunit/standalone/ProcessManager.java   | 40 ++++++++++----------
 1 file changed, 20 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/00a066b6/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 7dbdafd..9e62484 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,34 +172,32 @@ 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 buildDir = separator + "geode-core" + separator + "build" + separator;
 
-       String mainClasses = buildDir + "classes" + separator + "main";
-       dunitClasspath = removeFromPath(dunitClasspath, mainClasses);
+      String mainClasses = buildDir + "classes" + separator + "main";
+      dunitClasspath = removeFromPath(dunitClasspath, mainClasses);
 
-       String mainResources = buildDir + "resources" + separator + "main";
-       dunitClasspath = removeFromPath(dunitClasspath, mainResources);
+      String mainResources = buildDir + "resources" + separator + "main";
+      dunitClasspath = removeFromPath(dunitClasspath, mainResources);
 
-       String generatedResources = buildDir + "generated-resources" + separator + "main";
-       dunitClasspath = removeFromPath(dunitClasspath, generatedResources);
+      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-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);
+      buildDir = separator + "geode-json" + separator + "build" + separator + "classes" +
separator
+          + "main";
+      dunitClasspath = removeFromPath(dunitClasspath, buildDir);
 
       classPath = versionManager.getClasspath(version) + File.pathSeparator + dunitClasspath;
-    } else {
-      classPath = dunitClasspath;
     }
 
     // String tmpDir = System.getProperty("java.io.tmpdir");
@@ -215,7 +213,8 @@ public class ProcessManager {
     ArrayList<String> cmds = new ArrayList<String>();
     cmds.add(cmd);
     cmds.add("-classpath");
-    classPath = removeJREJars(classPath);
+    String jreLib = separator + "jre" + separator + "lib" + separator;
+    classPath = removeFromPath(classPath, jreLib);
     cmds.add(classPath);
     cmds.add("-D" + DUnitLauncher.RMI_PORT_PARAM + "=" + namingPort);
     cmds.add("-D" + DUnitLauncher.VM_NUM_PARAM + "=" + vmNum);
@@ -231,6 +230,8 @@ 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) {
@@ -256,13 +257,12 @@ public class ProcessManager {
     return rst;
   }
 
-  private String removeJREJars(String classpath) {
+  private String removeFromPath(String classpath, String partialPath) {
     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(jreLib)) {
+      if (!jar.contains(partialPath)) {
         if (!firstjar) {
           sb.append(File.pathSeparator);
         }


Mime
View raw message