hequn8128 commented on a change in pull request #13126:
URL: https://github.com/apache/flink/pull/13126#discussion_r469059373
##########
File path: flink-python/pyflink/datastream/stream_execution_environment.py
##########
@@ -20,6 +20,8 @@
from typing import List, Any
+from pyflink.common.job_client import JobClient
Review comment:
Put the import in the right order.
##########
File path:
flink-python/pyflink/datastream/tests/test_stream_execution_environment.py
##########
@@ -271,3 +271,16 @@ def test_read_text_file(self):
results.sort()
texts.sort()
self.assertEqual(texts, results)
+
+ def test_execute_async(self):
+ ds = self.env.from_collection([(1, 'Hi', 'Hello'), (2, 'Hello', 'Hi')],
+ type_info=Types.ROW(
+ [Types.INT(), Types.STRING(),
Types.STRING()]))
+ test_sink = DataStreamTestSinkFunction()
+ ds.add_sink(test_sink)
+ job_client = self.env.execute_async("test execute async")
+ job_id = job_client.get_job_id()
+ self.assertIsNotNone(job_id)
+ execution_result = job_client.get_job_execution_result().result()
+ self.assertEqual(str(job_id), str(execution_result.get_job_id()))
+ test_sink.get_results()
Review comment:
This line is useless.
----------------------------------------------------------------
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]