nastra commented on code in PR #8937:
URL: https://github.com/apache/iceberg/pull/8937#discussion_r1375759811
##########
aws/src/integration/java/org/apache/iceberg/aws/glue/TestGlueCatalogCommitFailure.java:
##########
@@ -426,10 +408,8 @@ public void testS3Exception() {
GlueTableOperations spyOps = Mockito.spy(ops);
failCommitAndThrowException(spyOps,
S3Exception.builder().statusCode(300).build());
-
- AssertHelpers.assertThrows(
- null, S3Exception.class, () -> spyOps.commit(metadataV2, metadataV1));
-
+ Assertions.assertThatThrownBy(() -> spyOps.commit(metadataV2, metadataV1))
+ .isInstanceOf(S3Exception.class);
Review Comment:
same here, we should add a check against the message
##########
aws/src/integration/java/org/apache/iceberg/aws/glue/TestGlueCatalogCommitFailure.java:
##########
@@ -446,9 +426,8 @@ public void testOtherGlueException() {
GlueTableOperations spyOps = Mockito.spy(ops);
failCommitAndThrowException(spyOps,
GlueException.builder().statusCode(300).build());
-
- AssertHelpers.assertThrows(
- null, GlueException.class, () -> spyOps.commit(metadataV2,
metadataV1));
+ Assertions.assertThatThrownBy(() -> spyOps.commit(metadataV2, metadataV1))
+ .isInstanceOf(GlueException.class);
Review Comment:
and here
##########
aws/src/integration/java/org/apache/iceberg/aws/glue/TestGlueCatalogCommitFailure.java:
##########
@@ -466,9 +445,8 @@ public void testInternalServerErrorRetryCommit() {
GlueTableOperations spyOps = Mockito.spy(ops);
failCommitAndThrowException(spyOps,
GlueException.builder().statusCode(500).build());
-
- AssertHelpers.assertThrows(
- null, CommitFailedException.class, () -> spyOps.commit(metadataV2,
metadataV1));
+ Assertions.assertThatThrownBy(() -> spyOps.commit(metadataV2, metadataV1))
+ .isInstanceOf(CommitFailedException.class);
Review Comment:
here as well
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]