diff --git a/tests/test_distributed/test_gpu_with_dask/test_gpu_demos.py b/tests/test_distributed/test_gpu_with_dask/test_gpu_demos.py index 92539aaa1..c0ae8b849 100644 --- a/tests/test_distributed/test_gpu_with_dask/test_gpu_demos.py +++ b/tests/test_distributed/test_gpu_with_dask/test_gpu_demos.py @@ -5,9 +5,13 @@ import pytest from xgboost import testing as tm +pytestmark = [ + pytest.mark.skipif(**tm.no_dask()), + pytest.mark.skipif(**tm.no_dask_cuda()), + tm.timeout(60), +] + -@pytest.mark.skipif(**tm.no_dask()) -@pytest.mark.skipif(**tm.no_dask_cuda()) @pytest.mark.skipif(**tm.no_cupy()) @pytest.mark.mgpu def test_dask_training(): @@ -16,8 +20,6 @@ def test_dask_training(): subprocess.check_call(cmd) -@pytest.mark.skipif(**tm.no_dask_cuda()) -@pytest.mark.skipif(**tm.no_dask()) @pytest.mark.mgpu def test_dask_sklearn_demo(): script = os.path.join(tm.demo_dir(__file__), "dask", "sklearn_gpu_training.py") diff --git a/tests/test_distributed/test_gpu_with_dask/test_gpu_with_dask.py b/tests/test_distributed/test_gpu_with_dask/test_gpu_with_dask.py index f25ac9fb0..a15e1903d 100644 --- a/tests/test_distributed/test_gpu_with_dask/test_gpu_with_dask.py +++ b/tests/test_distributed/test_gpu_with_dask/test_gpu_with_dask.py @@ -1,4 +1,4 @@ -"""Copyright 2019-2022 XGBoost contributors""" +"""Copyright 2019-2023, XGBoost contributors""" import asyncio import json from collections import OrderedDict @@ -18,6 +18,7 @@ from xgboost.testing.params import hist_parameter_strategy pytestmark = [ pytest.mark.skipif(**tm.no_dask()), pytest.mark.skipif(**tm.no_dask_cuda()), + tm.timeout(60), ] from ..test_with_dask.test_with_dask import generate_array @@ -629,6 +630,7 @@ def test_nccl_load(local_cuda_client: Client, tree_method: str) -> None: def run(wid: int) -> None: # FIXME(jiamingy): https://github.com/dmlc/xgboost/issues/9147 from xgboost.core import _LIB, _register_log_callback + _register_log_callback(_LIB) with CommunicatorContext(**args): diff --git a/tests/test_distributed/test_gpu_with_spark/test_data.py b/tests/test_distributed/test_gpu_with_spark/test_data.py index 72d9c190f..c2e068a87 100644 --- a/tests/test_distributed/test_gpu_with_spark/test_data.py +++ b/tests/test_distributed/test_gpu_with_spark/test_data.py @@ -2,7 +2,10 @@ import pytest from xgboost import testing as tm -pytestmark = pytest.mark.skipif(**tm.no_spark()) +pytestmark = [ + pytest.mark.skipif(**tm.no_spark()), + tm.timeout(120), +] from ..test_with_spark.test_data import run_dmatrix_ctor diff --git a/tests/test_distributed/test_gpu_with_spark/test_gpu_spark.py b/tests/test_distributed/test_gpu_with_spark/test_gpu_spark.py index 3bf94c954..f389d6d26 100644 --- a/tests/test_distributed/test_gpu_with_spark/test_gpu_spark.py +++ b/tests/test_distributed/test_gpu_with_spark/test_gpu_spark.py @@ -8,7 +8,10 @@ import sklearn from xgboost import testing as tm -pytestmark = pytest.mark.skipif(**tm.no_spark()) +pytestmark = [ + pytest.mark.skipif(**tm.no_spark()), + tm.timeout(240), +] from pyspark.ml.linalg import Vectors from pyspark.ml.tuning import CrossValidator, ParamGridBuilder