kennknowles commented on a change in pull request #14575:
URL: https://github.com/apache/beam/pull/14575#discussion_r617072884
##########
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:
Agree. Empty string makes me nervous. How about a string like `"this is
a test"` that you set to a variable early in the test case so anyone reading
understands that they are defined to be the same.
--
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:
[email protected]