[
https://issues.apache.org/jira/browse/CASSANDRA-16101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17196791#comment-17196791
]
Alex Petrov commented on CASSANDRA-16101:
-----------------------------------------
[~dcapwell] It looks like the main problem here is that exception is thrown in
auto-closeable, right? It is still possible to add a catch (see [1]) or
annotate test with an expected failure, so that would solve it. That said,
since we don't throw exceptions individually, but bucket them into
\{{ShutdownException}}, we have to search them. I'm thinking, if, instead of
adding all exceptions as suppressed to the first \{{Cause}}, should we mabye
add them as suppressed to {{ShutdownException}} itself? Would that make any
difference?
[1]:
{code:java}
@Test
public void testThrowingCloseable() throws Throwable
{
try (AutoCloseable closeable = new ThrowingCloseable())
{
}
catch (IllegalStateException e)
{
// do something about this exception
}
}
public static class ThrowingCloseable implements AutoCloseable
{
public void close()
{
throw new IllegalStateException("test");
}
} {code}
> Make sure we don't throw any uncaught exceptions during in-jvm dtests
> ---------------------------------------------------------------------
>
> Key: CASSANDRA-16101
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16101
> Project: Cassandra
> Issue Type: Improvement
> Components: Test/dtest/java
> Reporter: Marcus Eriksson
> Assignee: Marcus Eriksson
> Priority: Normal
>
> We should assert that we don't throw any uncaught exceptions when running
> in-jvm dtests
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]