github-actions[bot] commented on code in PR #41120:
URL: https://github.com/apache/beam/pull/41120#discussion_r4515215009


##########
sdks/java/extensions/google-cloud-platform-core/src/test/java/org/apache/beam/sdk/extensions/gcp/util/GcsUtilV2Test.java:
##########
@@ -1174,6 +1174,19 @@ public void testV2RemoveWithMixedResults() throws 
IOException {
         () ->
             withForbidden.remove(
                 ImmutableList.of(deleted.toString(), missing.toString(), 
forbidden.toString())));
+
+    GcsPath transientError = GcsPath.fromComponents("testbucket", "transient");
+    Storage retryStorage =
+        storageDeleting(
+            ImmutableMap.of(
+                "deleted",
+                batchResult(true, null),
+                "transient",
+                batchResult(null, new StorageException(503, "Service 
Unavailable"))));
+    when(retryStorage.delete(BlobId.of("testbucket", 
"transient"))).thenReturn(true);
+    gcsUtilWithV2Storage(retryStorage)
+        .remove(ImmutableList.of(deleted.toString(), 
transientError.toString()));
+    verify(retryStorage).delete(BlobId.of("testbucket", "transient"));

Review Comment:
   **🟢 Low**: `testV2RemoveWithMixedResults` tests the batch fallback for 
`remove()`, but the newly added batch fallback in `getBlobs()` 
(`GcsUtilV2.java` lines 549-557) and the uniform `StorageRetryStrategy` 
configuration on `StorageOptions` don't have corresponding unit test 
assertions. Consider adding a `503 Service Unavailable` sub-request case to 
`testV2GetObjectsWithMixedResults` to verify the `storage.get(...)` fallback 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]

Reply via email to