aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-home/src/test
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2015-06-23 18:19:49 +0200
committerDuarte Meneses <duarte.meneses@sonarsource.com>2015-06-23 18:26:13 +0200
commit299ceccf44a002e73fcdf8d7333456237e600b7a (patch)
tree0ba9ad0874fbf7af94d23cb0e9b30d2ab5c707aa /sonar-home/src/test
parent8b38a0ea417b681ef2553ba29870fa5933908007 (diff)
downloadsonarqube-299ceccf44a002e73fcdf8d7333456237e600b7a.tar.gz
sonarqube-299ceccf44a002e73fcdf8d7333456237e600b7a.zip
Revert merge to d70f025
Diffstat (limited to 'sonar-home/src/test')
-rw-r--r--sonar-home/src/test/java/org/sonar/home/cache/PersistentCacheTest.java24
1 files changed, 3 insertions, 21 deletions
diff --git a/sonar-home/src/test/java/org/sonar/home/cache/PersistentCacheTest.java b/sonar-home/src/test/java/org/sonar/home/cache/PersistentCacheTest.java
index e9abb0bc609..5f1e3424642 100644
--- a/sonar-home/src/test/java/org/sonar/home/cache/PersistentCacheTest.java
+++ b/sonar-home/src/test/java/org/sonar/home/cache/PersistentCacheTest.java
@@ -19,13 +19,12 @@
*/
package org.sonar.home.cache;
-import org.apache.commons.io.FileUtils;
-
import org.sonar.home.log.Slf4jLog;
import org.junit.Rule;
import org.junit.rules.TemporaryFolder;
import java.io.File;
+import java.nio.file.Path;
import java.util.concurrent.Callable;
import static org.mockito.Mockito.when;
@@ -97,25 +96,8 @@ public class PersistentCacheTest {
}
@Test
- public void testReconfigure() throws Exception {
- cache = new PersistentCache(tmp.getRoot().toPath(), Long.MAX_VALUE, log, true);
- assertCacheHit(false);
- assertCacheHit(false);
-
- File root = tmp.getRoot();
- FileUtils.deleteQuietly(root);
-
- // should re-create cache directory and start using the cache
- cache.reconfigure(false);
- assertThat(root).exists();
-
- assertCacheHit(false);
- assertCacheHit(true);
- }
-
- @Test
public void testExpiration() throws Exception {
- // negative time to make sure it is expired on the second call
+ //negative time to make sure it is expired on the second call
cache = new PersistentCache(tmp.getRoot().toPath(), -100, log, false);
assertCacheHit(false);
assertCacheHit(false);
@@ -136,7 +118,7 @@ public class PersistentCacheTest {
return VALUE;
}
}
-
+
/**
* WSCache should be transparent regarding exceptions: if an exception is thrown by the value loader, it should pass through
* the cache to the original caller using the cache.