summaryrefslogtreecommitdiffstats
path: root/sonar-batch
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2014-06-19 09:54:42 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2014-06-19 09:54:42 +0200
commit62c06ed061a53f4ec45a86f01075e08fff48e864 (patch)
tree35dd1f50e70829a3597d037337ec3e9cf142bd7b /sonar-batch
parentd22d24852ecf33ed29449e2ebe5b0bcfdca3e4a6 (diff)
downloadsonarqube-62c06ed061a53f4ec45a86f01075e08fff48e864.tar.gz
sonarqube-62c06ed061a53f4ec45a86f01075e08fff48e864.zip
Fix MeasurePersisterTest
Diffstat (limited to 'sonar-batch')
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/index/MeasurePersisterTest.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/sonar-batch/src/test/java/org/sonar/batch/index/MeasurePersisterTest.java b/sonar-batch/src/test/java/org/sonar/batch/index/MeasurePersisterTest.java
index bd589229f68..fe8a1a45a65 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/index/MeasurePersisterTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/index/MeasurePersisterTest.java
@@ -35,7 +35,6 @@ import org.sonar.api.resources.Project;
import org.sonar.api.rules.Rule;
import org.sonar.api.rules.RuleFinder;
import org.sonar.api.rules.RulePriority;
-import org.sonar.api.utils.SonarException;
import org.sonar.batch.scan.measure.MeasureCache;
import org.sonar.core.persistence.AbstractDaoTestCase;
@@ -64,10 +63,8 @@ public class MeasurePersisterTest extends AbstractDaoTestCase {
File aFile = new File("org/foo/Bar.java");
Snapshot projectSnapshot = snapshot(PROJECT_SNAPSHOT_ID);
Snapshot packageSnapshot = snapshot(PACKAGE_SNAPSHOT_ID);
-
- private SnapshotCache snapshotCache;
-
- private MeasureCache measureCache;
+ SnapshotCache snapshotCache;
+ MeasureCache measureCache;
@Before
public void mockResourcePersister() {
@@ -101,7 +98,7 @@ public class MeasurePersisterTest extends AbstractDaoTestCase {
Measure measure = new Measure(ncloc()).setValue(1234.0).setAlertText(TOO_LONG_FOR_VARCHAR_4000);
when(measureCache.entries()).thenReturn(Arrays.asList(new Cache.Entry<Measure>(new String[] {"foo", "ncloc"}, measure)));
- thrown.expect(SonarException.class);
+ thrown.expect(IllegalStateException.class);
thrown.expectMessage("Unable to save some measures");
measurePersister.persist();