This is an automated email from the ASF dual-hosted git repository.

zhuzh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 6da6e764a4f7a5f74c646a1b96422f585b414674
Author: JunRuiLee <jrlee....@gmail.com>
AuthorDate: Mon Jan 29 17:35:56 2024 +0800

    [hotfix][test] Update test_configuration.py to test test_parse_jars_value.
---
 flink-python/pyflink/common/tests/test_configuration.py | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/flink-python/pyflink/common/tests/test_configuration.py 
b/flink-python/pyflink/common/tests/test_configuration.py
index ab2fd273ee0..978bba538a7 100644
--- a/flink-python/pyflink/common/tests/test_configuration.py
+++ b/flink-python/pyflink/common/tests/test_configuration.py
@@ -18,6 +18,7 @@
 from copy import deepcopy
 
 from pyflink.common import Configuration
+from pyflink.java_gateway import get_gateway
 from pyflink.testing.test_case_utils import PyFlinkTestCase
 
 
@@ -163,3 +164,17 @@ class ConfigurationTests(PyFlinkTestCase):
         self.assertEqual(conf, conf2)
 
         self.assertEqual(str(conf), "{k1=v1, k2=1}")
+
+    def test_parse_jars_value(self):
+        jvm = get_gateway().jvm
+        # test parse YAML list
+        value = "- jar1\n- jar2\n- jar3"
+        expected_result = ['jar1', 'jar2', 'jar3']
+        result = Configuration.parse_jars_value(value, jvm)
+        self.assertEqual(result, expected_result)
+
+        # test parse legacy pattern
+        value = "jar1;jar2;jar3"
+        expected_result = ['jar1', 'jar2', 'jar3']
+        result = Configuration.parse_jars_value(value, jvm)
+        self.assertEqual(result, expected_result)

Reply via email to