[
https://issues.apache.org/jira/browse/GEODE-4097?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16306607#comment-16306607
]
ASF GitHub Bot commented on GEODE-4097:
---------------------------------------
jdeppe-pivotal closed pull request #1211: GEODE-4097: Adding a test for this
change
URL: https://github.com/apache/geode/pull/1211
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/StartMemberUtilsTest.java
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/StartMemberUtilsTest.java
index d84f788510..1fea6941e8 100644
---
a/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/StartMemberUtilsTest.java
+++
b/geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/StartMemberUtilsTest.java
@@ -28,9 +28,11 @@
import org.apache.commons.io.FileUtils;
import org.junit.Rule;
import org.junit.Test;
+import org.junit.contrib.java.lang.system.RestoreSystemProperties;
import org.junit.experimental.categories.Category;
import org.junit.rules.TemporaryFolder;
+import org.apache.geode.internal.GemFireVersion;
import org.apache.geode.internal.util.IOUtils;
import org.apache.geode.test.junit.categories.IntegrationTest;
@@ -40,6 +42,9 @@
@Rule
public TemporaryFolder temporaryFolder = new TemporaryFolder();
+ @Rule
+ public RestoreSystemProperties restorer = new RestoreSystemProperties();
+
@Test
public void workingDirDefaultsToMemberName() {
String workingDir = StartMemberUtils.resolveWorkingDir(null, "server1");
@@ -81,6 +86,21 @@ public void testReadPid() throws IOException {
assertEquals(expectedPid, actualPid);
}
+ @Test
+ public void testGeodeOnClasspathIsFirst() {
+ String currentClasspath = System.getProperty("java.class.path");
+ String customGeodeCore = "/custom/geode-core-" +
GemFireVersion.getGemFireVersion() + ".jar";
+ System.setProperty("java.class.path", currentClasspath + ":" +
customGeodeCore);
+
+ String[] otherJars = new String[] {"/other/one.jar", "/other/two.jar"};
+
+ String gemfireClasspath = StartMemberUtils.toClasspath(true, otherJars);
+ assertThat(gemfireClasspath).startsWith(customGeodeCore);
+
+ gemfireClasspath = StartMemberUtils.toClasspath(false, otherJars);
+ assertThat(gemfireClasspath).startsWith(customGeodeCore);
+ }
+
private void writePid(final File pidFile, final int pid) throws IOException {
final FileWriter fileWriter = new FileWriter(pidFile, false);
fileWriter.write(String.valueOf(pid));
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> No way to give private fix for geode-core jar
> ---------------------------------------------
>
> Key: GEODE-4097
> URL: https://issues.apache.org/jira/browse/GEODE-4097
> Project: Geode
> Issue Type: Bug
> Components: management
> Reporter: Igor Barchak
> Fix For: 1.3.0
>
>
> No way to give private fix for geode-core jar in different path , always
> taken hard coded from %GEODE_HOME/lib
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)