aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sonar-home/src/test/java/org/sonar/home/cache/PersistentCacheBuilderTest.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/sonar-home/src/test/java/org/sonar/home/cache/PersistentCacheBuilderTest.java b/sonar-home/src/test/java/org/sonar/home/cache/PersistentCacheBuilderTest.java
index 027e2d68924..33418cd75ca 100644
--- a/sonar-home/src/test/java/org/sonar/home/cache/PersistentCacheBuilderTest.java
+++ b/sonar-home/src/test/java/org/sonar/home/cache/PersistentCacheBuilderTest.java
@@ -20,6 +20,7 @@
package org.sonar.home.cache;
import static org.assertj.core.api.Assertions.assertThat;
+import static org.junit.Assume.*;
import java.nio.file.Files;
@@ -50,6 +51,8 @@ public class PersistentCacheBuilderTest {
@Test
public void read_system_env() {
+ assumeTrue(System.getenv("SONAR_USER_HOME") == null);
+
System.setProperty("user.home", temp.getRoot().getAbsolutePath());
PersistentCache cache = new PersistentCacheBuilder().build();