+++ /dev/null
-<?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>
+++ /dev/null
-<?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>
*/
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;
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;
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