Skip to content

Commit

Permalink
[hotfix][test] Update test_configuration.py to test test_parse_jars_v…
Browse files Browse the repository at this point in the history
…alue.
  • Loading branch information
JunRuiLee authored and zhuzhurk committed Jan 30, 2024
1 parent 3b4fa6c commit 6da6e76
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions flink-python/pyflink/common/tests/test_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -163,3 +164,17 @@ def test_hash_equal_str(self):
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)

0 comments on commit 6da6e76

Please sign in to comment.