bug: test_directory_direction_in is unstable
Opened this issue · 0 comments
maximilianpilz commented
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
Sometimes a failure of the following kind occurs:
================================== FAILURES ===================================
_________________ TestCommLogger.test_directory_direction_in __________________
[gw3] win32 -- Python 3.9.13 C:\hostedtoolcache\windows\Python\3.9.13\x64\python.exe
self = <tests.test_comm_logger.TestCommLogger testMethod=test_directory_direction_in>
def test_directory_direction_in(self):
"""Test the comm directory logger in direction."""
with tempfile.TemporaryDirectory() as directory, commlog.DirectoryLogger(log_folder=directory, log_in=True):
self.assertEqual(0, len(os.listdir(directory)))
for i, name in enumerate((commlog.DISCOVERY_IN,
commlog.SOAP_REQUEST_IN,
commlog.SOAP_RESPONSE_IN,
commlog.SOAP_SUBSCRIPTION_IN,
commlog.WSDL), start=1):
ip_address = uuid.uuid4().hex
http_method = uuid.uuid4().hex
logging.getLogger(name).debug(str(uuid.uuid4()),
extra={'ip_address': ip_address, 'http_method': http_method})
> self.assertEqual(i, len(os.listdir(directory)))
E AssertionError: 5 != 6
tests\test_comm_logger.py:70: AssertionError
Expected Behavior
The quoted failure never occurs.
Minimal Reproducible Example
No response
Solution proposal
No response
Python Version
3.9
Operating system
Windows Server 2022 (It has not been determined via the suggested command, but in another way.)
Sdc11073 Version
https://github.com/Draegerwerk/sdc11073/tree/9fe0e64675aa2287d85bc9db728de71f9fc0a1b8
Link to sdc11073 Logs
No response
Further Information
No response
Participation
- I am willing to submit a pull request to fix this bug.