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

Unclosed errors in test_ssl on macOS on Python 3.10 #508

Open
1 of 3 tasks
yihuang opened this issue May 15, 2022 · 4 comments
Open
1 of 3 tasks

Unclosed errors in test_ssl on macOS on Python 3.10 #508

yihuang opened this issue May 15, 2022 · 4 comments
Labels
bug Something is broken triage

Comments

@yihuang
Copy link

yihuang commented May 15, 2022

❓ I'm submitting a ...

  • 🐞 bug report
  • 🐣 feature request
  • ❓ question about the decisions made in the repository

🐞 Describe the bug. What is the current behavior?

❓ What is the motivation / use case for changing the behavior?

πŸ’‘ To Reproduce

Steps to reproduce the behavior:

$ python3 -mtox

πŸ’‘ Expected behavior

Tests should pass.

πŸ“‹ Details

            # the tests can sporadically generate resource warnings
            # due to timing issues
            # all of these sporadic warnings appear to be about socket.socket
            # and have been observed to come from requests connection pool
            msg = str(warn.message)
            if 'socket.socket' in msg:
                pytest.xfail(
                    '\n'.join((
                        'Sometimes this test fails due to '
                        'a socket.socket ResourceWarning:',
                        msg,
                    )),
                )
>           pytest.fail(msg)
E           Failed: unclosed <ssl.SSLSocket fd=16, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>

...

Results (24.58s):
     138 passed
       5 failed
         - cheroot/test/test_ssl.py:467 test_ssl_env[VerifyMode.CERT_NONE-True-builtin]
         - cheroot/test/test_ssl.py:467 test_ssl_env[VerifyMode.CERT_NONE-False-builtin]
         - cheroot/test/test_ssl.py:467 test_ssl_env[VerifyMode.CERT_OPTIONAL-True-builtin]
         - cheroot/test/test_ssl.py:467 test_ssl_env[VerifyMode.CERT_OPTIONAL-False-builtin]
         - cheroot/test/test_ssl.py:467 test_ssl_env[VerifyMode.CERT_REQUIRED-True-builtin]
       7 xfailed
       6 skipped
       1 rerun

πŸ“‹ Environment

  • Cheroot version: main branch
  • CherryPy version: X.X.X (if applicable)
  • Python version: 3.10.4
  • OS: macos 12.3.1

πŸ“‹ Additional context

@yihuang yihuang added bug Something is broken triage labels May 15, 2022
@jaraco
Copy link
Member

jaraco commented Jun 22, 2022

I get these same failures on my workstation.

@jaraco jaraco changed the title unit tests failed on macos Errors in test_ssl on macOS on Python 3.10 Jun 22, 2022
@jaraco
Copy link
Member

jaraco commented Jun 22, 2022

When I run the tests on Python 3.9, I get a different failure, but none of those reported above.

@jaraco
Copy link
Member

jaraco commented Jun 22, 2022

It looks like maybe this issue was encountered in CI and suppressed there only (bff4985).

jaraco added a commit that referenced this issue Jun 22, 2022
@jaraco
Copy link
Member

jaraco commented Jun 22, 2022

After expanding the xfail, the tests on Python 3.10 now fail the same as on 3.9 and 3.8.

@jaraco jaraco changed the title Errors in test_ssl on macOS on Python 3.10 Unclosed errors in test_ssl on macOS on Python 3.10 Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken triage
Projects
None yet
Development

No branches or pull requests

2 participants