From f79030e299ce766ec510ce2019c7b5e77105a1cd Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Wed, 31 Aug 2016 16:05:43 +0200 Subject: SONAR-7678 server-side stateless settings * Settings class becomes abstract as multiple implementations are used. Can't become an interface for binary backward-compatibility of API * tests should use MapSettings, an in-memory implementation of Settings * web server uses a thread-specific cache of settings when processing HTTP requests * web server does not have a cache of settings during startup, except for the system settings loaded from sonar.properties * Compute Engine uses a thread-specific cache of settings when processing a task. Cache is clear at end of task. * some useless methods of PersistentSettings are removed --- .../src/test/java/org/sonar/xoo/lang/XooTokenizerTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/sonar-xoo-plugin/src') diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/XooTokenizerTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/XooTokenizerTest.java index aaae76aa475..a5741a255f0 100644 --- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/XooTokenizerTest.java +++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/lang/XooTokenizerTest.java @@ -34,6 +34,7 @@ import org.sonar.api.config.Settings; import java.io.File; import java.io.IOException; +import org.sonar.api.config.MapSettings; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; @@ -54,7 +55,7 @@ public class XooTokenizerTest { baseDir = temp.newFolder(); fileSystem = new DefaultFileSystem(baseDir.toPath()); when(context.fileSystem()).thenReturn(fileSystem); - settings = new Settings(); + settings = new MapSettings(); when(context.settings()).thenReturn(settings); } -- cgit v1.2.3