devinbost opened a new issue #10155:
URL: https://github.com/apache/pulsar/issues/10155


   In an attempt to run the Python Function tests, I ran the script 
https://github.com/apache/pulsar/blob/master/pulsar-functions/instance/src/scripts/run_python_instance_tests.sh
   
   That blew up with this exception:
   
   > ======================================================================
   > ERROR: test_secretsprovider (unittest.loader._FailedTest)
   > ----------------------------------------------------------------------
   > ImportError: Failed to import test module: test_secretsprovider
   > Traceback (most recent call last):
   >   File "/Users/dbost/anaconda3/lib/python3.7/unittest/loader.py", line 
434, in _find_test_path
   >     module = self._get_module_from_name(name)
   >   File "/Users/dbost/anaconda3/lib/python3.7/unittest/loader.py", line 
375, in _get_module_from_name
   >     __import__(name)
   >   File 
"/Users/dbost/src/apache-pulsar/pulsar/pulsar-functions/instance/target/python-instance/tests/test_secretsprovider.py",
 line 26, in <module>
   >     import log
   >   File 
"/Users/dbost/src/apache-pulsar/pulsar/pulsar-functions/instance/target/python-instance/log.py",
 line 29, in <module>
   >     import pulsar
   >   File 
"/Users/dbost/src/apache-pulsar/pulsar/pulsar-functions/instance/target/python-instance/pulsar/__init__.py",
 line 102, in <module>
   >     import _pulsar
   > ModuleNotFoundError: No module named '_pulsar'
   
   
   Sure enough, log.py has the line `pulsar._pulsar.CompressionType.LZ4` 
(https://github.com/apache/pulsar/blob/master/pulsar-functions/instance/src/main/python/log.py#L51).
 
   However, in `python_instance.py`, that same enum value is referenced simply 
as `pulsar.CompressionType.LZ4` 
(https://github.com/apache/pulsar/blob/master/pulsar-functions/instance/src/main/python/python_instance.py#L325).
 
   
   How do I run these tests locally? 


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


Reply via email to