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

Rename assertThrows to assertThrown #52582

Merged
merged 7 commits into from
Feb 21, 2020

Conversation

jaymode
Copy link
Member

@jaymode jaymode commented Feb 20, 2020

This commit renames ElasticsearchAssertions#assertThrows to
assertThrown to avoid a naming clash with JUnit 4.13+ and static
imports of these methods. Additionally, these methods have been updated
to make use of expectThrows internally to avoid duplicating the logic
there.

Relates #51787

This commit renames ElasticsearchAssertions#assertThrows to
assertThrown to avoid a naming clash with JUnit 4.13+ and static
imports of these methods. Additionally, these methods have been updated
to make use of expectThrows internally to avoid duplicating the logic
there.

Relates elastic#51787
@jaymode jaymode requested a review from rjernst February 20, 2020 16:30
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Build)

@rjernst
Copy link
Member

rjernst commented Feb 20, 2020

The name seems to close to that which we are trying to avoid the clash. Could we make it more specific, like assertActionThrows or something like that?

@rjernst rjernst mentioned this pull request Feb 21, 2020
@jaymode
Copy link
Member Author

jaymode commented Feb 21, 2020

I renamed the methods to assertRequestBuilderThrows for those that accept a RequestBuilder and assertFutureThrows for those that accept an ActionFuture.

Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jaymode jaymode merged commit f83d75d into elastic:master Feb 21, 2020
@jaymode jaymode deleted the assert_throws_rename branch February 21, 2020 15:57
jaymode added a commit to jaymode/elasticsearch that referenced this pull request Feb 21, 2020
This commit renames ElasticsearchAssertions#assertThrows to
assertRequestBuilderThrows and assertFutureThrows to avoid a
naming clash with JUnit 4.13+ and static imports of these methods.
Additionally, these methods have been updated to make use of
expectThrows internally to avoid duplicating the logic there.

Relates elastic#51787
jaymode added a commit that referenced this pull request Feb 21, 2020
This commit renames ElasticsearchAssertions#assertThrows to
assertRequestBuilderThrows and assertFutureThrows to avoid a
naming clash with JUnit 4.13+ and static imports of these methods.
Additionally, these methods have been updated to make use of
expectThrows internally to avoid duplicating the logic there.

Relates #51787
Backport of #52582
bpintea added a commit to bpintea/elasticsearch that referenced this pull request Mar 4, 2020
s/assertThrows/assertRequestBuilderThrows as per elastic#52582
@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Delivery/Build Build or test infrastructure >non-issue Team:Delivery Meta label for Delivery team v7.7.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants