linliu-code commented on code in PR #12804:
URL: https://github.com/apache/hudi/pull/12804#discussion_r1962240669


##########
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/table/marker/TestTimelineServerBasedWriteMarkers.java:
##########
@@ -112,6 +112,73 @@ void verifyMarkersInFileSystem(boolean isTablePartitioned) 
throws IOException {
     closeQuietly(inputStream);
   }
 
+  @Test
+  public void testCreationWithTimelineServiceRetries() throws Exception {
+    // Validate marker creation/ deletion work without any failures in the 
timeline service.
+    createSomeMarkers(true);
+    assertTrue(storage.exists(markerFolderPath));
+    writeMarkers.doesMarkerDirExist();
+
+    // Simulate only a single failure and ensure the request fails.
+    restartServerAndClient(1);
+    // validate that subsequent request fails
+    validateRequestFailed(writeMarkers::doesMarkerDirExist);
+
+    // Simulate 3 failures, but make sure the request succeeds as retries are 
enabled
+    restartServerAndClient(3);
+    // Configure a new client with retries enabled.
+    TimelineServerBasedWriteMarkers writeMarkersWithRetries = initWriteMarkers(
+        metaClient.getBasePath().toString(),
+        markerFolderPath.toString(),
+        timelineService.getServerPort(),
+        true);
+    writeMarkersWithRetries.doesMarkerDirExist();

Review Comment:
   Done.



-- 
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]

Reply via email to