Skip to content

Commit

Permalink
Try 7
Browse files Browse the repository at this point in the history
  • Loading branch information
illia-v committed Jul 19, 2023
1 parent d26c22d commit 09ac375
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/with_dummyserver/test_socketlevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -1620,7 +1620,13 @@ def test_requesting_large_resources_via_ssl(
https://github.com/urllib3/urllib3/issues/2513
"""
content_length = 2**31 # (`int` max value in C) + 1.
port = 52549

# A hack to find a free port.
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.bind(("0.0.0.0", 0))
sock.listen()
port = sock.getsockname()[1]
sock.close()

# OpenSSL server won't be allowed to open the file unless `delete=False`.
temp_file = tempfile.NamedTemporaryFile(delete=False)
Expand Down

0 comments on commit 09ac375

Please sign in to comment.