nastra commented on code in PR #12818:
URL: https://github.com/apache/iceberg/pull/12818#discussion_r2120167480
##########
core/src/test/java/org/apache/iceberg/rest/TestRESTCatalog.java:
##########
@@ -2650,6 +2652,24 @@ public void testTableExistsFallbackToGETRequest() {
ConfigResponse.builder().withEndpoints(ImmutableList.of(Endpoint.V1_LOAD_TABLE)).build());
}
+ @Test
+ public void testErrorHandlingForConflicts() {
+ Consumer<ErrorResponse> errorResponseConsumer =
ErrorHandlers.tableCommitHandler();
+ // server returning 409 with client without retrying
+ ErrorResponse errorResponse409WithoutRetries =
+ ErrorResponse.builder().responseCode(409).wasRetried(false).build();
+ Assertions.assertThrows(
Review Comment:
can we please switch to AssertJ assertions here?
##########
core/src/test/java/org/apache/iceberg/rest/TestRESTCatalog.java:
##########
@@ -2650,6 +2652,24 @@ public void testTableExistsFallbackToGETRequest() {
ConfigResponse.builder().withEndpoints(ImmutableList.of(Endpoint.V1_LOAD_TABLE)).build());
}
+ @Test
+ public void testErrorHandlingForConflicts() {
+ Consumer<ErrorResponse> errorResponseConsumer =
ErrorHandlers.tableCommitHandler();
+ // server returning 409 with client without retrying
+ ErrorResponse errorResponse409WithoutRetries =
+ ErrorResponse.builder().responseCode(409).wasRetried(false).build();
+ Assertions.assertThrows(
Review Comment:
can we please switch to AssertJ assertions here to be consistent with the
rest of the codebase?
--
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]