Skip to content

Commit

Permalink
avoid test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb committed Mar 10, 2021
1 parent 39359c7 commit 9442bdf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/python_package_test/test_dask.py
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,11 @@ def test_network_params_not_required_but_respected_if_given(client, task, output

# model 2 - machines given
n_workers = len(client.scheduler_info()['workers'])
open_ports = [lgb.dask._find_random_open_port() for _ in range(n_workers)]
while True:
open_ports = [lgb.dask._find_random_open_port() for _ in range(n_workers)]
if len(set(open_ports)) == len(open_ports):
break

dask_model2 = dask_model_factory(
n_estimators=5,
num_leaves=5,
Expand Down

0 comments on commit 9442bdf

Please sign in to comment.