[router] Introduce router integration tests (#10086)
This commit is contained in:
8
sgl-router/py_test/fixtures/ports.py
Normal file
8
sgl-router/py_test/fixtures/ports.py
Normal file
@@ -0,0 +1,8 @@
|
||||
import socket
|
||||
|
||||
|
||||
def find_free_port() -> int:
|
||||
"""Return an available TCP port on localhost."""
|
||||
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
|
||||
s.bind(("127.0.0.1", 0))
|
||||
return s.getsockname()[1]
|
||||
Reference in New Issue
Block a user