aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java/org/sonarsource
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2016-09-16 15:21:00 +0200
committerDuarte Meneses <duarte.meneses@sonarsource.com>2016-09-16 15:21:00 +0200
commit00e8ca4b08e25f0db409d90a56113a0d0907fdf0 (patch)
tree6a540a50def5646bbe6b02b4a09848b08c954af3 /src/test/java/org/sonarsource
parent85c24bd5fe1485a43342e69058263aa48a51378d (diff)
downloadsonar-scanner-cli-00e8ca4b08e25f0db409d90a56113a0d0907fdf0.tar.gz
sonar-scanner-cli-00e8ca4b08e25f0db409d90a56113a0d0907fdf0.zip
SQSCANNER-23 Support the new 'MessageException' unchecked exception and log by default the error stack trace only when a non-MessageException is thrown
Diffstat (limited to 'src/test/java/org/sonarsource')
-rw-r--r--src/test/java/org/sonarsource/scanner/cli/MainTest.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/java/org/sonarsource/scanner/cli/MainTest.java b/src/test/java/org/sonarsource/scanner/cli/MainTest.java
index abf5fc0..7efc17a 100644
--- a/src/test/java/org/sonarsource/scanner/cli/MainTest.java
+++ b/src/test/java/org/sonarsource/scanner/cli/MainTest.java
@@ -28,7 +28,7 @@ import org.mockito.InOrder;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.sonar.api.utils.MessageException.MessageException;
+import org.sonar.api.utils.MessageException;
import org.sonarsource.scanner.api.EmbeddedScanner;
import org.sonarsource.scanner.api.ScanProperties;
@@ -91,7 +91,7 @@ public class MainTest {
verify(runner).stop();
verify(exit).exit(Exit.ERROR);
- verify(logs).error("Caused by: NPE");
+ verify(logs).error("Error during SonarQube Scanner execution", e);
}
@Test
@@ -99,7 +99,7 @@ public class MainTest {
Exception e = createException(false);
testException(e, false);
- verify(logs).error("Error during SonarQube Scanner execution");
+ verify(logs).error("Error during SonarQube Scanner execution", e);
verify(logs).error("Re-run SonarQube Scanner using the -X switch to enable full debug logging.");
}