deadwind4 commented on a change in pull request #18388:
URL: https://github.com/apache/flink/pull/18388#discussion_r790425806



##########
File path: flink-python/pyflink/datastream/tests/test_connectors.py
##########
@@ -149,6 +150,80 @@ def tearDown(self):
             
get_gateway().jvm.Thread.currentThread().setContextClassLoader(self._cxt_clz_loader)
 
 
+class FlinkPulsarTest(PyFlinkTestCase):
+
+    def setUp(self) -> None:
+        self.env = StreamExecutionEnvironment.get_execution_environment()
+        self.env.set_parallelism(2)
+        # Cache current ContextClassLoader, we will replace it with a 
temporary URLClassLoader to
+        # load specific connector jars with given module path to do dependency 
isolation. And We
+        # will change the ClassLoader back to the cached ContextClassLoader 
after the test case
+        # finished.
+        self._cxt_clz_loader = 
get_gateway().jvm.Thread.currentThread().getContextClassLoader()
+        
_load_specific_flink_module_jars('/flink-connectors/flink-sql-connector-pulsar')

Review comment:
       extracting to a ConnectorTestBase class




-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to