]> source.dussan.org Git - sonarqube.git/commitdiff
Move the files generated by PhasesSumUpTimeProfilerTest to a temp dir
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Wed, 5 Nov 2014 20:11:10 +0000 (21:11 +0100)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Wed, 5 Nov 2014 20:11:21 +0000 (21:11 +0100)
sonar-batch/.sonar/profiling/myProject-profiler.xml [deleted file]
sonar-batch/.sonar/profiling/total-execution-profiler.xml [deleted file]
sonar-batch/src/test/java/org/sonar/batch/profiling/PhasesSumUpTimeProfilerTest.java

diff --git a/sonar-batch/.sonar/profiling/myProject-profiler.xml b/sonar-batch/.sonar/profiling/myProject-profiler.xml
deleted file mode 100644 (file)
index 02c4b60..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
-<properties>
-<comment>SonarQube</comment>
-<entry key="FakeScanPersister">40</entry>
-<entry key="FakePostJob">30</entry>
-<entry key="FakeDecorator2">10</entry>
-<entry key="Initializers">7</entry>
-<entry key="FakeDecorator1">20</entry>
-<entry key="Post-Jobs">30</entry>
-<entry key="FakeSensor">10</entry>
-<entry key="Maven">4</entry>
-<entry key="Decorators">30</entry>
-<entry key="Persisters">40</entry>
-<entry key="Free memory">9</entry>
-<entry key="Sensors">10</entry>
-<entry key="FakeInitializer">7</entry>
-</properties>
diff --git a/sonar-batch/.sonar/profiling/total-execution-profiler.xml b/sonar-batch/.sonar/profiling/total-execution-profiler.xml
deleted file mode 100644 (file)
index 7232c1d..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
-<properties>
-<comment>SonarQube</comment>
-<entry key="FakeScanPersister">120</entry>
-<entry key="FakePostJob">90</entry>
-<entry key="FakeDecorator2">30</entry>
-<entry key="Initializers">21</entry>
-<entry key="FakeDecorator1">60</entry>
-<entry key="Post-Jobs">90</entry>
-<entry key="FakeSensor">30</entry>
-<entry key="Maven">12</entry>
-<entry key="Decorators">90</entry>
-<entry key="Persisters">120</entry>
-<entry key="Free memory">27</entry>
-<entry key="Sensors">30</entry>
-<entry key="FakeInitializer">21</entry>
-</properties>
index a22bee54b7d832948222c3a43497de37b14c0145..6424548f97bae427fe61bf1258e8b1f3cf15ea69 100644 (file)
  */
 package org.sonar.batch.profiling;
 
+import com.google.common.collect.Maps;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
+import org.sonar.api.CoreProperties;
 import org.sonar.api.batch.Decorator;
 import org.sonar.api.batch.DecoratorContext;
 import org.sonar.api.batch.Initializer;
@@ -52,10 +54,10 @@ import org.sonar.batch.phases.Phases.Phase;
 import org.sonar.batch.phases.event.PersisterExecutionHandler;
 import org.sonar.batch.phases.event.PersistersPhaseHandler;
 
-import java.io.IOException;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
+import java.util.Map;
 
 import static org.fest.assertions.Assertions.assertThat;
 import static org.mockito.Mockito.spy;
@@ -70,9 +72,11 @@ public class PhasesSumUpTimeProfilerTest {
   private PhasesSumUpTimeProfiler profiler;
 
   @Before
-  public void prepare() throws IOException {
+  public void prepare() throws Exception {
     clock = new MockedSystem();
-    profiler = new PhasesSumUpTimeProfiler(clock, new BootstrapProperties(Collections.<String, String>emptyMap()));
+    Map<String, String> props = Maps.newHashMap();
+    props.put(CoreProperties.WORKING_DIRECTORY, temp.newFolder().getAbsolutePath());
+    profiler = new PhasesSumUpTimeProfiler(clock, new BootstrapProperties(props));
   }
 
   @Test