aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-server-benchmarks
diff options
context:
space:
mode:
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>2015-12-17 13:57:32 +0100
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>2015-12-17 13:57:32 +0100
commit069498e3513365213618294886caff9781ac23aa (patch)
treecfcf060b6b9f4dfd5ef075e782f707f9706d4ba7 /server/sonar-server-benchmarks
parent5c75034675b60ec9a4decaf5ecce49574d987c8e (diff)
parent9c311c559136c62930e6463c525dd735b3ecac16 (diff)
downloadsonarqube-069498e3513365213618294886caff9781ac23aa.tar.gz
sonarqube-069498e3513365213618294886caff9781ac23aa.zip
Merge branch 'branch-5.3'
Diffstat (limited to 'server/sonar-server-benchmarks')
-rw-r--r--server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/PersistFileSourcesStepTest.java14
1 files changed, 11 insertions, 3 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 722b99b9238..8cfa29b8274 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
@@ -23,6 +23,7 @@ package org.sonar.server.benchmark;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
import org.apache.commons.io.FileUtils;
import org.junit.Rule;
@@ -43,7 +44,10 @@ import org.sonar.server.computation.batch.BatchReportReaderImpl;
import org.sonar.server.computation.batch.TreeRootHolderRule;
import org.sonar.server.computation.component.Component;
import org.sonar.server.computation.component.ReportComponent;
+import org.sonar.server.computation.duplication.Duplicate;
+import org.sonar.server.computation.duplication.Duplication;
import org.sonar.server.computation.duplication.DuplicationRepositoryRule;
+import org.sonar.server.computation.duplication.InnerDuplicate;
import org.sonar.server.computation.duplication.TextBlock;
import org.sonar.server.computation.scm.ScmInfoRepositoryImpl;
import org.sonar.server.computation.source.SourceHashRepositoryImpl;
@@ -141,9 +145,13 @@ public class PersistFileSourcesStepTest {
LineData lineData = new LineData();
for (int line = 1; line <= NUMBER_OF_LINES; line++) {
lineData.generateLineData(line);
-
- duplicationRepository.addDuplication(fileRef, new TextBlock(line, line), new TextBlock(line + 1, line + 1));
-
+ duplicationRepository.add(
+ fileRef,
+ new Duplication(
+ new TextBlock(line, line),
+ Arrays.<Duplicate>asList(new InnerDuplicate(new TextBlock(line + 1, line + 1)))
+ )
+ );
}
writer.writeComponent(BatchReport.Component.newBuilder()
.setRef(fileRef)