From 8421ccce128549c41f413839388061128fbd0769 Mon Sep 17 00:00:00 2001 From: Uriel Date: Mon, 9 Mar 2026 03:44:32 -0300 Subject: [PATCH] reduce range on macOS --- test/webhost/test_port_allocation.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/webhost/test_port_allocation.py b/test/webhost/test_port_allocation.py index 673565e6c7..4368097fce 100644 --- a/test/webhost/test_port_allocation.py +++ b/test/webhost/test_port_allocation.py @@ -1,4 +1,5 @@ import os +import platform import unittest from WebHostLib.customserver import parse_game_ports, create_random_port_socket, get_used_ports @@ -74,7 +75,8 @@ class TestPortAllocating(unittest.TestCase): s.close() sockets.clear() - for _ in range(20_000 - len(get_used_ports())): + length = 5_000 if platform.system() == "Darwin" else (30_000 - len(get_used_ports())) + for _ in range(length): socket = create_random_port_socket(("30000-65535",), "127.0.0.1") sockets.append(socket) _, port = socket.getsockname()