Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: test_directory_direction_in is unstable #383

Open
1 of 2 tasks
maximilianpilz opened this issue Jul 24, 2024 · 0 comments
Open
1 of 2 tasks

bug: test_directory_direction_in is unstable #383

maximilianpilz opened this issue Jul 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@maximilianpilz
Copy link
Collaborator

maximilianpilz commented Jul 24, 2024

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.
@maximilianpilz maximilianpilz added the bug Something isn't working label Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant