dianfu commented on a change in pull request #11719: [FLINK-17124][python] Fix
The PyFlink Job runs into infinite loop if the UDF file imports job code.
URL: https://github.com/apache/flink/pull/11719#discussion_r407833239
##########
File path: flink-python/pyflink/table/tests/test_dependency.py
##########
@@ -196,11 +196,28 @@ def check_python_exec(i):
self.t_env.register_function("check_python_exec",
udf(check_python_exec, DataTypes.BIGINT(),
DataTypes.BIGINT()))
+
+ def check_pyflink_gateway_disabled(i):
+ try:
+ from pyflink.java_gateway import get_gateway
+ get_gateway()
+ except Exception as e:
Review comment:
Use assertRaisesRegex? Could refer to
test_pandas_udf.test_non_exist_udf_type for more details on how to use
assertRaisesRegex.
----------------------------------------------------------------
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]
With regards,
Apache Git Services