From ff1d7a6b36dd7948c28292f87dce2331941060f1 Mon Sep 17 00:00:00 2001 From: fangfengbin <869218239a@zju.edu.cn> Date: Sun, 26 Jul 2020 11:26:45 +0800 Subject: [PATCH] [GCS]Open test_gcs_fault_tolerance testcase (#9677) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * enable test_gcs_fault_tolerance * fix lint error Co-authored-by: 灵洵 --- python/ray/tests/BUILD | 3 +-- python/ray/tests/test_gcs_fault_tolerance.py | 10 ++++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/python/ray/tests/BUILD b/python/ray/tests/BUILD index 6dc95fa4c..9a1132769 100644 --- a/python/ray/tests/BUILD +++ b/python/ray/tests/BUILD @@ -468,8 +468,7 @@ py_test( name = "test_gcs_fault_tolerance", size = "medium", srcs = SRCS + ["test_gcs_fault_tolerance.py"], - # TODO(swang): Enable again once pubsub client supports GCS server restart. - tags = ["exclusive", "manual"], + tags = ["exclusive"], deps = ["//:ray_lib"], ) diff --git a/python/ray/tests/test_gcs_fault_tolerance.py b/python/ray/tests/test_gcs_fault_tolerance.py index ab6ed0509..71ea68a93 100644 --- a/python/ray/tests/test_gcs_fault_tolerance.py +++ b/python/ray/tests/test_gcs_fault_tolerance.py @@ -1,3 +1,4 @@ +import os import sys import ray @@ -20,6 +21,9 @@ def increase(x): return x + 1 +@pytest.mark.skipif( + os.environ.get("RAY_GCS_ACTOR_SERVICE_ENABLED") != "true", + reason=("This testcase can only be run when GCS actor management is on.")) def test_gcs_server_restart(ray_start_regular): actor1 = Increase.remote() result = ray.get(actor1.method.remote(1)) @@ -39,6 +43,9 @@ def test_gcs_server_restart(ray_start_regular): assert result == 2 +@pytest.mark.skipif( + os.environ.get("RAY_GCS_ACTOR_SERVICE_ENABLED") != "true", + reason=("This testcase can only be run when GCS actor management is on.")) def test_gcs_server_restart_during_actor_creation(ray_start_regular): ids = [] for i in range(0, 100): @@ -54,6 +61,9 @@ def test_gcs_server_restart_during_actor_creation(ray_start_regular): assert len(unready) == 0 +@pytest.mark.skipif( + os.environ.get("RAY_GCS_ACTOR_SERVICE_ENABLED") != "true", + reason=("This testcase can only be run when GCS actor management is on.")) @pytest.mark.parametrize( "ray_start_cluster_head", [generate_internal_config_map(num_heartbeats_timeout=20)],