aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-server-benchmarks
diff options
context:
space:
mode:
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>2015-05-22 14:21:05 +0200
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>2015-05-25 13:32:36 +0200
commitd7c582501f2f2327d52c7f2738b28b1776a9c5d5 (patch)
tree1745f657d9b2d6fdbcdb9e82f826c7ae477ab3fb /server/sonar-server-benchmarks
parent2b93b6e78216b2c7c5f8c1b44bdffdd0714aaaa7 (diff)
downloadsonarqube-d7c582501f2f2327d52c7f2738b28b1776a9c5d5.tar.gz
sonarqube-d7c582501f2f2327d52c7f2738b28b1776a9c5d5.zip
SONAR-6568 add DbClient, tree root and LanguageRepository to ComputationContext
Diffstat (limited to 'server/sonar-server-benchmarks')
-rw-r--r--server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/PersistFileSourcesStepTest.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/PersistFileSourcesStepTest.java b/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/PersistFileSourcesStepTest.java
index 1f6d704cf76..d4a52759cb6 100644
--- a/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/PersistFileSourcesStepTest.java
+++ b/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/PersistFileSourcesStepTest.java
@@ -37,6 +37,9 @@ import org.sonar.core.persistence.DbTester;
import org.sonar.server.computation.ComputationContext;
import org.sonar.server.computation.component.DbComponentsRefCache;
import org.sonar.server.computation.component.DbComponentsRefCache.DbComponent;
+import org.sonar.server.computation.component.ComponentTreeBuilders;
+import org.sonar.server.computation.component.DumbComponent;
+import org.sonar.server.computation.language.LanguageRepository;
import org.sonar.server.computation.step.PersistFileSourcesStep;
import org.sonar.server.db.DbClient;
import org.sonar.server.source.db.FileSourceDao;
@@ -47,6 +50,7 @@ import java.util.ArrayList;
import java.util.List;
import static org.assertj.core.api.Assertions.assertThat;
+import static org.mockito.Mockito.mock;
public class PersistFileSourcesStepTest {
@@ -80,7 +84,7 @@ public class PersistFileSourcesStepTest {
long start = System.currentTimeMillis();
PersistFileSourcesStep step = new PersistFileSourcesStep(dbClient, System2.INSTANCE, dbComponentsRefCache);
- step.execute(new ComputationContext(new BatchReportReader(reportDir), "PROJECT_KEY", new Settings()));
+ step.execute(new ComputationContext(new BatchReportReader(reportDir), "PROJECT_KEY", new Settings(), dbClient, ComponentTreeBuilders.from(DumbComponent.DUMB_PROJECT), mock(LanguageRepository.class)));
long end = System.currentTimeMillis();
long duration = end - start;