aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch/src
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-batch/src')
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/mediumtest/measures/MeasuresMediumTest.java2
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/sensor/DefaultSensorStorageTest.java27
2 files changed, 2 insertions, 27 deletions
diff --git a/sonar-batch/src/test/java/org/sonar/batch/mediumtest/measures/MeasuresMediumTest.java b/sonar-batch/src/test/java/org/sonar/batch/mediumtest/measures/MeasuresMediumTest.java
index b46febe1ab5..87d124989ed 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/mediumtest/measures/MeasuresMediumTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/mediumtest/measures/MeasuresMediumTest.java
@@ -65,7 +65,7 @@ public class MeasuresMediumTest {
.newScanTask(new File(projectDir, "sonar-project.properties"))
.start();
- assertThat(result.allMeasures()).hasSize(69);
+ assertThat(result.allMeasures()).hasSize(63);
}
@Test
diff --git a/sonar-batch/src/test/java/org/sonar/batch/sensor/DefaultSensorStorageTest.java b/sonar-batch/src/test/java/org/sonar/batch/sensor/DefaultSensorStorageTest.java
index b03d9baf3bd..d62fd760616 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/sensor/DefaultSensorStorageTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/sensor/DefaultSensorStorageTest.java
@@ -39,14 +39,13 @@ import org.sonar.api.batch.sensor.measure.internal.DefaultMeasure;
import org.sonar.api.config.Settings;
import org.sonar.api.measures.CoreMetrics;
import org.sonar.api.measures.Measure;
-import org.sonar.api.measures.PersistenceMode;
import org.sonar.api.resources.File;
import org.sonar.api.resources.Project;
import org.sonar.api.resources.Resource;
import org.sonar.api.rule.RuleKey;
import org.sonar.batch.duplication.DuplicationCache;
-import org.sonar.batch.index.DefaultIndex;
import org.sonar.batch.index.BatchComponentCache;
+import org.sonar.batch.index.DefaultIndex;
import org.sonar.batch.issue.ModuleIssues;
import org.sonar.batch.report.ReportPublisher;
import org.sonar.batch.sensor.coverage.CoverageExclusions;
@@ -126,30 +125,6 @@ public class DefaultSensorStorageTest {
}
@Test
- public void shouldSetAppropriatePersistenceMode() {
- // Metric FUNCTION_COMPLEXITY_DISTRIBUTION is only persisted on directories.
-
- InputFile file = new DefaultInputFile("foo", "src/Foo.php");
-
- ArgumentCaptor<org.sonar.api.measures.Measure> argumentCaptor = ArgumentCaptor.forClass(org.sonar.api.measures.Measure.class);
- Resource sonarFile = File.create("src/Foo.php").setEffectiveKey("foo:src/Foo.php");
- resourceCache.add(sonarFile, null).setInputPath(file);
-
- when(sonarIndex.addMeasure(eq(sonarFile), argumentCaptor.capture())).thenReturn(null);
-
- sensorStorage.store(new DefaultMeasure()
- .onFile(file)
- .forMetric(CoreMetrics.FUNCTION_COMPLEXITY_DISTRIBUTION)
- .withValue("foo"));
-
- org.sonar.api.measures.Measure m = argumentCaptor.getValue();
- assertThat(m.getData()).isEqualTo("foo");
- assertThat(m.getMetric()).isEqualTo(CoreMetrics.FUNCTION_COMPLEXITY_DISTRIBUTION);
- assertThat(m.getPersistenceMode()).isEqualTo(PersistenceMode.MEMORY);
-
- }
-
- @Test
public void shouldSaveProjectMeasureToSensorContext() {
ArgumentCaptor<org.sonar.api.measures.Measure> argumentCaptor = ArgumentCaptor.forClass(org.sonar.api.measures.Measure.class);