cultmesh-py: bind test proves only the UDP number was taken
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
e0f5e13a1b
commit
cff68d5528
1 changed files with 5 additions and 0 deletions
|
|
@ -42,6 +42,11 @@ class ServerBindTests(unittest.TestCase):
|
|||
holder = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
holder.bind(("127.0.0.1", 0))
|
||||
port = holder.getsockname()[1]
|
||||
free = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
try:
|
||||
free.bind(("127.0.0.1", port)) # the TCP number is free: only the UDP one is taken
|
||||
finally:
|
||||
free.close()
|
||||
threads_before = threading.active_count()
|
||||
try:
|
||||
failing = server(port=port)
|
||||
|
|
|
|||
Loading…
Reference in a new issue