-
Notifications
You must be signed in to change notification settings - Fork 2k
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
API: Remove deprecated AssertHelpers usage #7468
Conversation
@akshayakp97 thanks for looking into this. It seems there's an overlap with #7482, so you might want to sync up with @liuxiaocs7. |
@nastra thanks for looking at my PR! I will update my PR to exclude the overlapping files from |
api/src/test/java/org/apache/iceberg/TestPartitionSpecValidation.java
Outdated
Show resolved
Hide resolved
api/src/test/java/org/apache/iceberg/expressions/TestEvaluator.java
Outdated
Show resolved
Hide resolved
api/src/test/java/org/apache/iceberg/expressions/TestExpressionHelpers.java
Outdated
Show resolved
Hide resolved
() -> Iterables.getLast(concat5)); | ||
|
||
Assertions.assertThatThrownBy(() -> Iterables.getLast(concat5)) | ||
.isInstanceOf(NoSuchElementException.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be good to check for the specific error msg here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the review. I don't see any error message in this case.
Refer - https://github.com/google/guava/blob/master/guava/src/com/google/common/collect/Iterables.java#L849
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah ok, thanks for checking. Alternatively we could use .hasMessage(null)
to indicate that there's no message I guess
api/src/test/java/org/apache/iceberg/transforms/TestBucketing.java
Outdated
Show resolved
Hide resolved
Assertions.assertThatThrownBy( | ||
() -> PartitionSpec.builderFor(SCHEMA).year("ts").year("ts").build()) | ||
.hasMessageContaining("Cannot use partition name more than once") | ||
.isInstanceOf(IllegalArgumentException.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: in other places typically the .hasMessage..
part comes after .isInstanceOf()
, so we should probably make this consistent here as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just one minor comment around consistency, but other than that, this LGTM. @jackye1995 do you have any further comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me!
Summary
api
module