]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-8684 Remove env variable TMPDIR
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Thu, 26 Jan 2017 11:11:43 +0000 (12:11 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Thu, 26 Jan 2017 16:52:52 +0000 (17:52 +0100)
This variable was only used by rails

sonar-application/src/main/java/org/sonar/application/App.java
sonar-application/src/test/java/org/sonar/application/AppTest.java

index b956ed11dbededb9198b7817aa061d28a467c643..04d70c81d93798ff39962b8a71349c5d1e87f81c 100644 (file)
@@ -114,8 +114,6 @@ public class App implements Stoppable {
       .addJavaOptions(props.nonNullValue(ProcessProperties.WEB_JAVA_ADDITIONAL_OPTS))
       // required for logback tomcat valve
       .setEnvVariable(ProcessProperties.PATH_LOGS, props.nonNullValue(ProcessProperties.PATH_LOGS))
-      // ensure JRuby uses SQ's temp directory as temp directory (eg. for temp files used during HTTP uploads)
-      .setEnvVariable("TMPDIR", props.nonNullValue(ProcessProperties.PATH_TEMP))
       .setClassName("org.sonar.server.app.WebServer")
       .addClasspath("./lib/common/*")
       .addClasspath("./lib/server/*");
index 1c1ac6ab110714657f6cf9211733bfebd70e50b5..7a7a79c78165576a01d5b66f22fb0a67d8d554c5 100644 (file)
@@ -35,7 +35,6 @@ import org.sonar.process.monitor.JavaCommand;
 import org.sonar.process.monitor.Monitor;
 
 import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.Assertions.entry;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
 
@@ -113,17 +112,6 @@ public class AppTest {
     assertThat(commands.get(1).getClasspath()).contains("oracle/ojdbc6.jar");
   }
 
-  @Test
-  public void sets_TMPDIR_env_var_of_Web_process() throws Exception {
-    Props props = initDefaultProps();
-    String expectedTmpDir = "expected tmp dir";
-    props.set("sonar.path.temp", expectedTmpDir);
-
-    List<JavaCommand> commands = start(props);
-
-    assertThat(commands.get(1).getEnvVariables()).contains(entry("TMPDIR", expectedTmpDir));
-  }
-
   @Test
   public void configure_http_and_https_proxies_on_all_processes() throws Exception {
     Props props = initDefaultProps();