You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Kevin Gallardo (Jira)" <ji...@apache.org> on 2020/04/02 15:48:00 UTC

[jira] [Assigned] (CASSANDRA-15683) Fix NPE in SimpleReadWriteTest after test framework behavior change

     [ https://issues.apache.org/jira/browse/CASSANDRA-15683?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Gallardo reassigned CASSANDRA-15683:
------------------------------------------

    Assignee: Kevin Gallardo

> Fix NPE in SimpleReadWriteTest after test framework behavior change
> -------------------------------------------------------------------
>
>                 Key: CASSANDRA-15683
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15683
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Test/dtest
>            Reporter: Kevin Gallardo
>            Assignee: Kevin Gallardo
>            Priority: Normal
>
> In JVM dtests, all exceptions thrown in a request execution used to be always wrapped in a RuntimeException.
> After CASSANDRA-15650 changes, the behavior has been changed to: If the exception is a RuntimeException, just rethrow it, otherwise wrap in RuntimeException, as you can see in: [https://github.com/apache/cassandra/commit/dfc279a22a5563ac7a832a586914d5410426e9b7#diff-0b019281b7e97248577c82af0e663ef4R211]
> This causes the tests that were always extracting the cause from the wrapping RuntimeException before, to check the root cause of the error, to throw a NPE when they call {{getCause()}}, tests such as {{SimpleReadWriteTest#readWithSchemaDisagreement}} and {{SimpleReadWriteTest#writeWithSchemaDisagreement}}.
> Can be fixed by simply not unwrapping the cause in those tests, use the thrown exception directly, if the behavior of "not always wrapping in RuntimeException" is expected.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org