geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GEODE-4042) Cargo tests for Jetty and Tomcat should use java.io.tmpdir instead of hardcoding to /tmp
Date Tue, 05 Dec 2017 19:45:00 GMT

    [ https://issues.apache.org/jira/browse/GEODE-4042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16279111#comment-16279111
] 

ASF GitHub Bot commented on GEODE-4042:
---------------------------------------

jhuynh1 closed pull request #1120: GEODE-4042: Removing additional references to /tmp
URL: https://github.com/apache/geode/pull/1120
 
 
   

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/src/test/java/org/apache/geode/session/tests/ContainerInstall.java
b/geode-assembly/src/test/java/org/apache/geode/session/tests/ContainerInstall.java
index 5064c22512..4409d17687 100644
--- a/geode-assembly/src/test/java/org/apache/geode/session/tests/ContainerInstall.java
+++ b/geode-assembly/src/test/java/org/apache/geode/session/tests/ContainerInstall.java
@@ -63,10 +63,11 @@
   private final String MODULE_PATH;
   private final String WAR_FILE_PATH;
 
+  public static final String TMP_DIR = System.getProperty("java.io.tmpdir", "/tmp");
   public static final String GEODE_BUILD_HOME = System.getenv("GEODE_HOME");
-  public static final String DEFAULT_INSTALL_DIR = "/tmp/cargo_containers/";
+  public static final String DEFAULT_INSTALL_DIR = TMP_DIR + "/cargo_containers/";
   protected static final String DEFAULT_MODULE_LOCATION = GEODE_BUILD_HOME + "/tools/Modules/";
-  public static final String DEFAULT_MODULE_EXTRACTION_DIR = "/tmp/cargo_modules/";
+  public static final String DEFAULT_MODULE_EXTRACTION_DIR = TMP_DIR + "/cargo_modules/";
 
   /**
    * Represents the type of connection used in this installation
@@ -137,7 +138,8 @@ public ContainerInstall(String installDir, String downloadURL, ConnectionType
co
     logger.info("Installing container from URL " + downloadURL);
 
     // Optional step to install the container from a URL pointing to its distribution
-    Installer installer = new ZipURLInstaller(new URL(downloadURL), "/tmp/downloads", installDir);
+    Installer installer =
+        new ZipURLInstaller(new URL(downloadURL), TMP_DIR + "/downloads", installDir);
     installer.install();
 
     // Set install home
diff --git a/geode-assembly/src/test/java/org/apache/geode/session/tests/GenericAppServerContainer.java
b/geode-assembly/src/test/java/org/apache/geode/session/tests/GenericAppServerContainer.java
index fbd9593dbb..70a82c1429 100644
--- a/geode-assembly/src/test/java/org/apache/geode/session/tests/GenericAppServerContainer.java
+++ b/geode-assembly/src/test/java/org/apache/geode/session/tests/GenericAppServerContainer.java
@@ -15,6 +15,7 @@
 package org.apache.geode.session.tests;
 
 import static org.apache.geode.session.tests.ContainerInstall.GEODE_BUILD_HOME;
+import static org.apache.geode.session.tests.ContainerInstall.TMP_DIR;
 
 import java.io.File;
 import java.io.IOException;
@@ -41,7 +42,7 @@
   private final File modifyWarScript;
   private final File modifyWarScriptLog;
 
-  private static final String DEFAULT_GENERIC_APPSERVER_WAR_DIR = "/tmp/cargo_wars/";
+  private static final String DEFAULT_GENERIC_APPSERVER_WAR_DIR = TMP_DIR + "/cargo_wars/";
 
   /**
    * Setup the generic appserver container
diff --git a/geode-assembly/src/test/java/org/apache/geode/session/tests/ServerContainer.java
b/geode-assembly/src/test/java/org/apache/geode/session/tests/ServerContainer.java
index a1b36fa664..71e5e73663 100644
--- a/geode-assembly/src/test/java/org/apache/geode/session/tests/ServerContainer.java
+++ b/geode-assembly/src/test/java/org/apache/geode/session/tests/ServerContainer.java
@@ -14,6 +14,8 @@
  */
 package org.apache.geode.session.tests;
 
+import static org.apache.geode.session.tests.ContainerInstall.TMP_DIR;
+
 import java.io.File;
 import java.io.IOException;
 import java.util.Arrays;
@@ -70,7 +72,7 @@
 
   public static final String DEFAULT_LOGGING_LEVEL = LoggingLevel.LOW.getLevel();
   public static final String DEFAULT_LOG_DIR = "cargo_logs/";
-  public static final String DEFAULT_CONFIG_DIR = "/tmp/cargo_configs/";
+  public static final String DEFAULT_CONFIG_DIR = TMP_DIR + "/cargo_configs/";
 
   public static final Logger logger = LogService.getLogger();
 


 

----------------------------------------------------------------
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:
users@infra.apache.org


> 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)

Mime
View raw message