You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/04/20 22:59:53 UTC

[GitHub] [beam] emilymye commented on a change in pull request #14575: Adds --sdkContainerImage as new Java Dataflow PipelineOption

emilymye commented on a change in pull request #14575:
URL: https://github.com/apache/beam/pull/14575#discussion_r617088364



##########
File path: runners/google-cloud-dataflow-java/src/test/java/org/apache/beam/runners/dataflow/DataflowRunnerTest.java
##########
@@ -1591,15 +1607,23 @@ public void testTemplateRunnerLoggedErrorForFile() throws Exception {
   }
 
   @Test
-  public void testWorkerHarnessContainerImage() {
+  public void testGetContainerImageForJobFromOption() {
     DataflowPipelineOptions options = PipelineOptionsFactory.as(DataflowPipelineOptions.class);
 
-    // default image set
-    options.setWorkerHarnessContainerImage("some-container");
+    // When image option is set, should use that exact image.
+    options.setSdkContainerImage("some-container");
     assertThat(getContainerImageForJob(options), equalTo("some-container"));
 
+    // When image option is empty, container image should not return default
+    // to allow for use of pipeline worker jar.
+    options.setSdkContainerImage("");

Review comment:
       made a list of test cases with a comment about testing empty string specifically




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org