Skip to content

Commit e3047ae

Browse files
sampan-s-nayaksampan
authored andcommitted
[core] fix test_token_auth_integration on windows (ray-project#59961)
Signed-off-by: sampan <sampan@anyscale.com> Co-authored-by: sampan <sampan@anyscale.com> Signed-off-by: jasonwrwang <jasonwrwang@tencent.com>
1 parent c9cce6a commit e3047ae

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

python/ray/tests/conftest.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1541,7 +1541,9 @@ def setup_cluster_with_token_auth(cleanup_auth_token_env):
15411541
reset_auth_token_state()
15421542

15431543
cluster = Cluster()
1544-
cluster.add_node()
1544+
# Use dynamic port to avoid port conflicts on Windows where sockets
1545+
# linger in TIME_WAIT state between tests
1546+
cluster.add_node(dashboard_agent_listen_port=find_free_port())
15451547

15461548
try:
15471549
context = ray.init(address=cluster.address)
@@ -1565,7 +1567,9 @@ def setup_cluster_without_token_auth(cleanup_auth_token_env):
15651567
reset_auth_token_state()
15661568

15671569
cluster = Cluster()
1568-
cluster.add_node()
1570+
# Use dynamic port to avoid port conflicts on Windows where sockets
1571+
# linger in TIME_WAIT state between tests
1572+
cluster.add_node(dashboard_agent_listen_port=find_free_port())
15691573

15701574
try:
15711575
context = ray.init(address=cluster.address)

0 commit comments

Comments
 (0)