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

2024.4.9: test_connect_timeout[Requests] fails #9659

Closed
9 of 10 tasks
mtelka opened this issue Apr 10, 2024 · 0 comments · Fixed by #9906
Closed
9 of 10 tasks

2024.4.9: test_connect_timeout[Requests] fails #9659

mtelka opened this issue Apr 10, 2024 · 0 comments · Fixed by #9906
Assignees
Labels
bug Bug that is not site-specific networking core networking related

Comments

@mtelka
Copy link

mtelka commented Apr 10, 2024

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

  • I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

Provide a description that is worded well enough to be understood

I'm packaging yt-dlp 2024.4.9 for OpenIndiana and I noticed that the TestHTTPRequestHandler.test_connect_timeout[Requests] test fails while all other tests either pass or skip. The related test_connect_timeout[Urllib] test pass and the test_connect_timeout[CurlCFFI] test is skipped here.

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • If using API, add 'verbose': True to YoutubeDL params instead
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

____________ TestHTTPRequestHandler.test_connect_timeout[Requests] _____________

self = <test.test_networking.TestHTTPRequestHandler object at 0x7fffaa05d340>
handler = functools.partial(<class 'yt_dlp.networking._requests.RequestsRH'>, logger=<class 'yt_dlp.utils._YDLLogger'>)

    @pytest.mark.parametrize('handler', ['Urllib', 'Requests', 'CurlCFFI'], indirect=True)
    def test_connect_timeout(self, handler):
        # nothing should be listening on this port
        connect_timeout_url = 'http://10.255.255.255'
        with handler(timeout=0.01) as rh:
            now = time.time()
            with pytest.raises(TransportError):
                validate_and_send(
                    rh, Request(connect_timeout_url))
>           assert 0.01 <= time.time() - now < 20
E           assert 0.01 <= (1712734046.9629605 - 1712734046.9537818)
E            +  where 1712734046.9629605 = <built-in function time>()
E            +    where <built-in function time> = time.time

test/test_networking.py:553: AssertionError
@mtelka mtelka added bug Bug that is not site-specific triage Untriaged issue labels Apr 10, 2024
@coletdjnz coletdjnz added the networking core networking related label Apr 10, 2024
@bashonly bashonly removed the triage Untriaged issue label May 10, 2024
coletdjnz added a commit that referenced this issue May 18, 2024
Fixes #9659

Authored by: coletdjnz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug that is not site-specific networking core networking related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants