liferoad commented on code in PR #28621:
URL: https://github.com/apache/beam/pull/28621#discussion_r1373620864
##########
runners/google-cloud-dataflow-java/src/test/java/org/apache/beam/runners/dataflow/DataflowRunnerTest.java:
##########
@@ -824,6 +840,24 @@ public void testUploadGraph() throws IOException {
.startsWith("gs://valid-bucket/temp/staging/dataflow_graph"));
}
+ /** Test for automatically using upload_graph when the job graph is too
large (>10MB). */
+ @Test
+ public void testUploadGraphWithAutoUpload() throws IOException {
+ DataflowPipelineOptions options = buildPipelineOptions();
+ Pipeline p = buildDataflowPipelineWithLargeGraph(options);
+ p.run();
+
+ ArgumentCaptor<Job> jobCaptor = ArgumentCaptor.forClass(Job.class);
+ Mockito.verify(mockJobs).create(eq(PROJECT_ID), eq(REGION_ID),
jobCaptor.capture());
+ assertValidJob(jobCaptor.getValue());
+ assertTrue(jobCaptor.getValue().getSteps().isEmpty());
+ assertTrue(
+ jobCaptor
+ .getValue()
+ .getStepsLocation()
+ .startsWith("gs://valid-bucket/temp/staging/dataflow_graph"));
Review Comment:
Noted.
--
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]