hequn8128 commented on a change in pull request #13126:
URL: https://github.com/apache/flink/pull/13126#discussion_r469066578



##########
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:
       Maybe we can use the clear() method. It just does what we need. 




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