diff options
| author | Neal Norwitz <nnorwitz@gmail.com> | 2006-06-12 02:13:21 (GMT) |
|---|---|---|
| committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-06-12 02:13:21 (GMT) |
| commit | 909eb12c9529971db352c91327c8d72bd0d16e4b (patch) | |
| tree | 414723ff1756ab7060ca4a81bd5df7e383430fd3 /Lib/test/test_socket_ssl.py | |
| parent | b9845e72f9af2c47fbeeb0d27bd1659e38a9ffbd (diff) | |
| download | cpython-909eb12c9529971db352c91327c8d72bd0d16e4b.zip cpython-909eb12c9529971db352c91327c8d72bd0d16e4b.tar.gz cpython-909eb12c9529971db352c91327c8d72bd0d16e4b.tar.bz2 | |
Fix the socket tests so they can be run concurrently. Backport candidate
Diffstat (limited to 'Lib/test/test_socket_ssl.py')
| -rw-r--r-- | Lib/test/test_socket_ssl.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_socket_ssl.py b/Lib/test/test_socket_ssl.py index 1091383..074b627 100644 --- a/Lib/test/test_socket_ssl.py +++ b/Lib/test/test_socket_ssl.py @@ -71,7 +71,7 @@ def test_rude_shutdown(): return # Some random port to connect to. - PORT = 9934 + PORT = [9934] listener_ready = threading.Event() listener_gone = threading.Event() @@ -82,7 +82,7 @@ def test_rude_shutdown(): # know the socket is gone. def listener(): s = socket.socket() - s.bind(('', PORT)) + PORT[0] = test_support.bind_port(s, '', PORT[0]) s.listen(5) listener_ready.set() s.accept() @@ -92,7 +92,7 @@ def test_rude_shutdown(): def connector(): listener_ready.wait() s = socket.socket() - s.connect(('localhost', PORT)) + s.connect(('localhost', PORT[0])) listener_gone.wait() try: ssl_sock = socket.ssl(s) |
