[
https://issues.apache.org/jira/browse/GEODE-4042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16286589#comment-16286589
]
ASF GitHub Bot commented on GEODE-4042:
---------------------------------------
jhuynh1 closed pull request #1145: GEODE-4042: pass down java.io.tmpdir from
gradle to test vms
URL: https://github.com/apache/geode/pull/1145
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-assembly/build.gradle b/geode-assembly/build.gradle
index 7be16ab645..4b38b46089 100755
--- a/geode-assembly/build.gradle
+++ b/geode-assembly/build.gradle
@@ -121,6 +121,7 @@ test {
tasks.withType(Test){
environment 'GEODE_HOME', "$buildDir/install/${distributions.main.baseName}"
+ systemProperty 'java.io.tmpdir', System.getProperty('java.io.tmpdir', '/tmp')
}
task defaultDistributionConfig(type: JavaExec, dependsOn: classes) {
diff --git
a/geode-assembly/src/test/java/org/apache/geode/session/tests/TomcatSessionBackwardsCompatibilityTest.java
b/geode-assembly/src/test/java/org/apache/geode/session/tests/TomcatSessionBackwardsCompatibilityTest.java
index aae71e450e..a0904a557c 100644
---
a/geode-assembly/src/test/java/org/apache/geode/session/tests/TomcatSessionBackwardsCompatibilityTest.java
+++
b/geode-assembly/src/test/java/org/apache/geode/session/tests/TomcatSessionBackwardsCompatibilityTest.java
@@ -14,6 +14,7 @@
*/
package org.apache.geode.session.tests;
+import static org.apache.geode.session.tests.ContainerInstall.TMP_DIR;
import static org.junit.Assert.assertEquals;
import java.io.File;
@@ -61,10 +62,10 @@
}
@Rule
- public transient GfshCommandRule gfsh = new GfshCommandRule();
+ public transient GfshCommandRule gfsh = new GfshCommandRule(new
File(TMP_DIR));
@Rule
- public TemporaryFolder tempFolder = new TemporaryFolder();
+ public TemporaryFolder tempFolder = new TemporaryFolder(new File(TMP_DIR));
@Rule
public transient TestName testName = new TestName();
diff --git
a/geode-core/src/test/java/org/apache/geode/test/junit/rules/GfshCommandRule.java
b/geode-core/src/test/java/org/apache/geode/test/junit/rules/GfshCommandRule.java
index 6ab7908fe8..79fb99fae2 100644
---
a/geode-core/src/test/java/org/apache/geode/test/junit/rules/GfshCommandRule.java
+++
b/geode-core/src/test/java/org/apache/geode/test/junit/rules/GfshCommandRule.java
@@ -89,6 +89,15 @@ public GfshCommandRule() {
}
}
+ public GfshCommandRule(File parentForTempDirectory) {
+ this.temporaryFolder = new TemporaryFolder(parentForTempDirectory);
+ try {
+ temporaryFolder.create();
+ } catch (IOException e) {
+ throw new UncheckedIOException(e);
+ }
+ }
+
public GfshCommandRule(Supplier<Integer> portSupplier, PortType portType) {
this();
this.portType = portType;
----------------------------------------------------------------
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]
> Cargo tests for Jetty and Tomcat should use java.io.tmpdir instead of
> hardcoding to /tmp
> ----------------------------------------------------------------------------------------
>
> Key: GEODE-4042
> URL: https://issues.apache.org/jira/browse/GEODE-4042
> Project: Geode
> Issue Type: Bug
> Components: http session
> Reporter: Jason Huynh
> Assignee: Jason Huynh
>
> Currently the Cargo Tests for the session state module are hard coded to run
> off of /tmp. Instead it should probably be pointed towards using
> java.io.tmpdir.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)