leiyiz commented on a change in pull request #12709:
URL: https://github.com/apache/beam/pull/12709#discussion_r483279172



##########
File path: 
sdks/python/apache_beam/testing/benchmarks/nexmark/nexmark_launcher.py
##########
@@ -156,34 +191,32 @@ def parse_args(self):
 
     # Usage with Dataflow requires a project to be supplied.
     self.project = self.pipeline_options.view_as(GoogleCloudOptions).project
-    if self.project is None:
-      parser.print_usage()
-      print(sys.argv[0] + ': error: argument --project is required')
-      sys.exit(1)
-
-    # Pub/Sub is currently available for use only in streaming pipelines.
     self.streaming = self.pipeline_options.view_as(StandardOptions).streaming
-    if self.streaming is None:
-      parser.print_usage()
-      print(sys.argv[0] + ': error: argument --streaming is required')
-      sys.exit(1)
 
     # wait_until_finish ensures that the streaming job is canceled.
     self.wait_until_finish_duration = (
         self.pipeline_options.view_as(TestOptions).wait_until_finish_duration)
-    if self.wait_until_finish_duration is None:
-      parser.print_usage()
-      print(sys.argv[0] + ': error: argument --wait_until_finish_duration is 
required')  # pylint: disable=line-too-long
-      sys.exit(1)
+    self.runner = self.pipeline_options.view_as(StandardOptions).runner
+
+    if self.streaming:
+      if self.wait_until_finish_duration is None\
+          or self.project is None or self.runner != 'DataflowRunner':
+        print('error: argument --wait_until_finish_duration\n' +

Review comment:
       RuntimeError right? as it is an unexpected error




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


Reply via email to