Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More assertion related cleanups #20522

Merged
merged 5 commits into from
Feb 1, 2024
Merged

More assertion related cleanups #20522

merged 5 commits into from
Feb 1, 2024

Conversation

findepi
Copy link
Member

@findepi findepi commented Jan 31, 2024

Follow up to #20509

@findepi findepi added test no-release-notes This pull request does not require release notes entry labels Jan 31, 2024
@cla-bot cla-bot bot added the cla-signed label Jan 31, 2024
@github-actions github-actions bot added tests:hive iceberg Iceberg connector delta-lake Delta Lake connector hive Hive connector bigquery BigQuery connector mongodb MongoDB connector labels Jan 31, 2024
@findepi
Copy link
Member Author

findepi commented Jan 31, 2024

currently based on #20509. only new commits to be reviewed here

@findepi
Copy link
Member Author

findepi commented Jan 31, 2024

just rebased after #20509 merged. no other changes yet

@findepi
Copy link
Member Author

findepi commented Jan 31, 2024

Previously the test asserted that query fails (somehow). Now it asserts
that it fails with `TrinoException` and verifies the message returned to
the user.
Verify that query failures are `TrinoException`. This is achieved by
leveraging query assert.
Simplifies the test class.
Previously,  when `nonTrinoExceptionFailure()` encountered a
`TrinoException` instance, it would throw "Expecting code to raise a
throwable." with little information what the problem actually is.
Validating the exception explicitly (without `assertThatThrownBy`)
allows producing better message in such case.
Previously `UnsupportedOperationException` could be surfaced to the
user.
@findepi findepi merged commit 6e7f96d into master Feb 1, 2024
96 checks passed
@findepi findepi deleted the findepi/assert-more branch February 1, 2024 09:30
@github-actions github-actions bot added this to the 438 milestone Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bigquery BigQuery connector cla-signed delta-lake Delta Lake connector hive Hive connector iceberg Iceberg connector mongodb MongoDB connector no-release-notes This pull request does not require release notes entry test
Development

Successfully merging this pull request may close these issues.

2 participants