nastra commented on code in PR #8937:
URL: https://github.com/apache/iceberg/pull/8937#discussion_r1376027328
##########
aws/src/integration/java/org/apache/iceberg/aws/glue/TestGlueCatalogCommitFailure.java:
##########
@@ -357,12 +345,10 @@ public void testCreateTableWithInvalidDB() {
GlueTableOperations spyOps = Mockito.spy(ops);
failCommitAndThrowException(spyOps,
EntityNotFoundException.builder().build());
-
- AssertHelpers.assertThrows(
- "Should throw not found exception",
- NotFoundException.class,
- "because Glue cannot find the requested entity",
- () -> spyOps.commit(metadataV2, metadataV1));
+ Assertions.assertThatThrownBy(() -> spyOps.commit(metadataV2, metadataV1))
+ .as("Should throw not found exception")
Review Comment:
not needed
##########
aws/src/integration/java/org/apache/iceberg/aws/glue/TestGlueCatalogCommitFailure.java:
##########
@@ -380,13 +366,10 @@ public void testGlueAccessDeniedException() {
GlueTableOperations spyOps = Mockito.spy(ops);
failCommitAndThrowException(spyOps,
AccessDeniedException.builder().build());
-
- AssertHelpers.assertThrows(
- "Should throw forbidden exception",
- ForbiddenException.class,
- "because Glue cannot access the requested resources",
- () -> spyOps.commit(metadataV2, metadataV1));
-
+ Assertions.assertThatThrownBy(() -> spyOps.commit(metadataV2, metadataV1))
+ .as("Should throw forbidden exception")
Review Comment:
not needed
##########
aws/src/integration/java/org/apache/iceberg/aws/glue/TestGlueCatalogCommitFailure.java:
##########
@@ -403,12 +386,11 @@ public void testGlueValidationException() {
GlueTableOperations spyOps = Mockito.spy(ops);
failCommitAndThrowException(spyOps, ValidationException.builder().build());
-
- AssertHelpers.assertThrows(
- "Should throw validation exception",
- org.apache.iceberg.exceptions.ValidationException.class,
- "because Glue encountered a validation exception while accessing
requested resources",
- () -> spyOps.commit(metadataV2, metadataV1));
+ Assertions.assertThatThrownBy(() -> spyOps.commit(metadataV2, metadataV1))
+ .as("Should throw validation exception")
Review Comment:
not needed
--
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]