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

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


The following commit(s) were added to refs/heads/master by this push:
     new 987be33b [hotfix] Update pattern matching in test_ml_lib_completeness 
to work with release branch
987be33b is described below

commit 987be33b19fd746e0d94ed64e2631806e82d7a56
Author: Dong Lin <[email protected]>
AuthorDate: Wed Apr 12 16:54:12 2023 +0800

    [hotfix] Update pattern matching in test_ml_lib_completeness to work with 
release branch
    
    This closes #232.
---
 flink-ml-python/pyflink/ml/tests/test_ml_lib_completeness.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/flink-ml-python/pyflink/ml/tests/test_ml_lib_completeness.py 
b/flink-ml-python/pyflink/ml/tests/test_ml_lib_completeness.py
index 243c0dbe..db59df0b 100644
--- a/flink-ml-python/pyflink/ml/tests/test_ml_lib_completeness.py
+++ b/flink-ml-python/pyflink/ml/tests/test_ml_lib_completeness.py
@@ -49,8 +49,12 @@ class MLLibTest(PyFlinkMLTestCase):
         FLINK_ML_LIB_SOURCE_PATH = os.path.abspath(os.path.join(
             this_directory, "../../../../flink-ml-lib"))
 
-        ml_lib_jar = glob.glob(os.path.join(
-            FLINK_ML_LIB_SOURCE_PATH, "target", 
"flink-ml-lib-*SNAPSHOT.jar"))[0]
+        paths = glob.glob(os.path.join(
+            FLINK_ML_LIB_SOURCE_PATH, "target", "flink-ml-lib-*.jar"))
+        paths = [path for path in paths if "test" not in path]
+        if len(paths) != 1:
+            raise Exception("The number of matched paths " + str(paths) + " is 
unexpected.")
+        ml_lib_jar = paths[0]
 
         StageAnalyzer = 
get_gateway().jvm.org.apache.flink.ml.util.StageAnalyzer
         module_path = 'org.apache.flink.ml.{0}'.format(self.module_name())

Reply via email to