svetakvsundhar commented on code in PR #30073:
URL: https://github.com/apache/beam/pull/30073#discussion_r1463513033


##########
sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/healthcare/DicomIOReadIT.java:
##########
@@ -90,4 +94,29 @@ public void testDicomMetadataRead() throws IOException {
       // noop - if runner does not support job.cancel()
     }
   }
+
+  @Test
+  public void testDicomFailedMetadataRead() throws IOException {
+    String badWebPath = "foo";
+
+    DicomIO.ReadStudyMetadata.Result result =
+        
pipeline.apply(Create.of(badWebPath)).apply(DicomIO.readStudyMetadata());
+
+    PAssert.that(result.getReadResponse()).empty();
+
+    PAssert.that(result.getFailedReads())
+        .satisfies(
+            (errors) -> {
+              Assert.assertTrue(errors.iterator().hasNext());
+              return null;
+            });
+
+    PipelineResult job = pipeline.run();
+
+    try {
+      job.cancel();

Review Comment:
   Thanks, you're right in that its 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]

Reply via email to