diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2016-09-16 16:08:38 +0200 |
---|---|---|
committer | Duarte Meneses <duarte.meneses@sonarsource.com> | 2016-09-16 16:08:38 +0200 |
commit | b37e0615accadebdb29166ddb1e383ea54cca16f (patch) | |
tree | 233d830b2dcc8bc68b90d2ac595e9134a595fd6b /src/test/java/org/sonarsource/scanner/cli/LogsTest.java | |
parent | b3301560b57ee7075eb729ec4dea2b2e53e6e0b9 (diff) | |
download | sonar-scanner-cli-b37e0615accadebdb29166ddb1e383ea54cca16f.tar.gz sonar-scanner-cli-b37e0615accadebdb29166ddb1e383ea54cca16f.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/scanner/cli/LogsTest.java')
-rw-r--r-- | src/test/java/org/sonarsource/scanner/cli/LogsTest.java | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/test/java/org/sonarsource/scanner/cli/LogsTest.java b/src/test/java/org/sonarsource/scanner/cli/LogsTest.java index bda9d28..d688982 100644 --- a/src/test/java/org/sonarsource/scanner/cli/LogsTest.java +++ b/src/test/java/org/sonarsource/scanner/cli/LogsTest.java @@ -70,18 +70,12 @@ public class LogsTest { @Test public void testError() { Exception e = new NullPointerException("exception"); - logs.setDisplayStackTrace(false); logs.error("error1"); verify(stdErr).println("ERROR: error1"); logs.error("error2", e); verify(stdErr).println("ERROR: error2"); - - verifyNoMoreInteractions(stdOut, stdErr); - - logs.setDisplayStackTrace(true); - logs.error("error3", e); - verify(stdErr).println("ERROR: error3"); + verify(stdErr).println(e); // other interactions to print the exception.. } |