Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dask] Use an invalid port for test. #8064

Merged
merged 1 commit into from
Jul 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions tests/python/test_with_dask.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Copyright 2019-2022 XGBoost contributors"""
from pathlib import Path
import pickle
import socket
import testing as tm
import pytest
import xgboost as xgb
Expand Down Expand Up @@ -1243,11 +1244,11 @@ def after_iteration(
os.remove(after_fname)

with dask.config.set({'xgboost.foo': "bar"}):
with pytest.raises(ValueError):
with pytest.raises(ValueError, match=r"Unknown configuration.*"):
xgb.dask.train(client, {}, dtrain, num_boost_round=4)

with dask.config.set({'xgboost.scheduler_address': "127.0.0.1:22"}):
with pytest.raises(PermissionError):
with dask.config.set({'xgboost.scheduler_address': "127.0.0.1:foo"}):
with pytest.raises(socket.gaierror, match=r".*not known.*"):
xgb.dask.train(client, {}, dtrain, num_boost_round=1)

def run_updater_test(
Expand Down