dianfu commented on a change in pull request #11768: [FLINK-16943][python] 
Support set the configuration option "pipeline.jars" in PyFlink.
URL: https://github.com/apache/flink/pull/11768#discussion_r409503068
 
 

 ##########
 File path: flink-python/pyflink/table/tests/test_table_environment_api.py
 ##########
 @@ -329,6 +334,54 @@ def test_table_environment_with_blink_planner(self):
 
         self.assert_equals(results, ['2,hi,hello\n', '3,hello,hello\n'])
 
+    def test_set_jars(self):
+        jar_urls = []
+        func1_class_name = 
"org.apache.flink.table.planner.plan.stream.sql.Func1"
+        func2_class_name = "org.apache.flink.python.util.TestScalarFunction"
+        jar_urls.extend(self.validate_and_return_unloaded_jar_url(
+            func1_class_name,
+            
"flink-table/flink-table-planner-blink/target/flink-table-planner-blink*-tests.jar"))
+        jar_urls.extend(self.validate_and_return_unloaded_jar_url(
+            func2_class_name,
+            "flink-python/target/flink-python*-tests.jar"))
+
+        # test set the "pipeline.jars" multiple times
+        
self.t_env.get_config().get_configuration().set_string("pipeline.jars", 
";".join(jar_urls))
+        first_class_loader = 
get_gateway().jvm.Thread.currentThread().getContextClassLoader()
+
+        
self.t_env.get_config().get_configuration().set_string("pipeline.jars", 
jar_urls[0])
+        
self.t_env.get_config().get_configuration().set_string("pipeline.jars", 
";".join(jar_urls))
+        third_class_loader = 
get_gateway().jvm.Thread.currentThread().getContextClassLoader()
 
 Review comment:
   third_class_loader -> second_class_loader

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to