singhpk234 commented on code in PR #13339: URL: https://github.com/apache/iceberg/pull/13339#discussion_r2153686204
########## core/src/test/java/org/apache/iceberg/rest/TestHTTPClient.java: ########## @@ -456,6 +462,39 @@ public void testCloseChild() throws IOException { .doesNotThrowAnyException(); } + @ParameterizedTest(name = "[{index}] selfConflict={0}") + @ValueSource(booleans = {true, false}) + public void testCommitAndRetry(boolean selfConflict) throws IOException { + ResourcePaths paths = ResourcePaths.forCatalogProperties(Map.of()); + ErrorHandler errorHandler = (ErrorHandler) ErrorHandlers.tableCommitHandler(); + String path = paths.table(TableIdentifier.of("ns", "table")); + Item updateTableRequestBody = new Item(0L, "table update"); + if (selfConflict) { + // First request will respond with 503 (Service Unavailable) if self-conflict is enabled + addRequestTestCaseAndGetPath(path, HttpMethod.POST, updateTableRequestBody, 503); Review Comment: Lets use 500 as the code here, for all practical purpose 503 should not result in conflict. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org