Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-15683

Fix NPE in SimpleReadWriteTest after test framework behavior change

    XMLWordPrintableJSON

    Details

      Description

      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 agreed to be correct.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                newkek Kevin Gallardo
                Reporter:
                newkek Kevin Gallardo
                Authors:
                Kevin Gallardo
                Reviewers:
                Brandon Williams, David Capwell
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: