You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Jörg Sautter (JIRA)" <ji...@apache.org> on 2019/04/12 11:34:00 UTC
[jira] [Created] (NETBEANS-2405) Suppressed Exceptions are not
visible to users (Junit 5)
Jörg Sautter created NETBEANS-2405:
--------------------------------------
Summary: Suppressed Exceptions are not visible to users (Junit 5)
Key: NETBEANS-2405
URL: https://issues.apache.org/jira/browse/NETBEANS-2405
Project: NetBeans
Issue Type: Bug
Components: java - JUnit
Affects Versions: 10.0
Environment: win 10, x64, open jdk 11.0.2
Reporter: Jörg Sautter
Suppressed Exceptions are not visible to users in the "Test Results" window and the console. Junit 5 is using this to report several exceptions in one test (see org.junit.platform.engine.support.hierarchical.ThrowableCollector#add)
Console-Output:
{code:java}
doSomething Time elapsed: 0.016 s <<< ERROR!
java.lang.IllegalStateException: the exception
at com.company.DummyTest.doSomething(DummyTest.java:25)
Caused by: java.lang.IllegalStateException: the cause
at com.company.DummyTest.doSomething(DummyTest.java:25)
{code}
Code to reproduce:
{code:java}
@org.junit.jupiter.api.Test
public void doSomething() {
IllegalStateException dummy = new IllegalStateException(
"the exception", new IllegalStateException("the cause")
);
dummy.addSuppressed(new IllegalStateException("the suppressed"));
throw dummy;
}
{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists