From 4569ea24741ee8394c99ea43e1f43fefc7cbbd37 Mon Sep 17 00:00:00 2001 From: Sasha Belousov <141743480+BelSasha@users.noreply.github.com> Date: Thu, 5 Sep 2024 17:46:47 +0300 Subject: [PATCH] modify cluster status checks tests (#1197) Co-authored-by: Alexandra Belousov --- runhouse/servers/cluster_servlet.py | 1 + tests/test_servers/test_servlet.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/runhouse/servers/cluster_servlet.py b/runhouse/servers/cluster_servlet.py index 13814dab6..0ae833865 100644 --- a/runhouse/servers/cluster_servlet.py +++ b/runhouse/servers/cluster_servlet.py @@ -93,6 +93,7 @@ async def __init__( ) collect_gpu_thread.start() + if self.cluster_config.get("has_cuda"): logger.debug("Creating _periodic_gpu_check thread.") collect_gpu_thread = threading.Thread( diff --git a/tests/test_servers/test_servlet.py b/tests/test_servers/test_servlet.py index fa77b44bc..f40158f6f 100644 --- a/tests/test_servers/test_servlet.py +++ b/tests/test_servers/test_servlet.py @@ -23,10 +23,10 @@ def test_put_resource(self, test_env_servlet): assert deserialize_data(resp.data, resp.serialization) == resource.name @pytest.mark.level("unit") - def test_put_obj_local(self, test_servlet): + def test_put_obj_local(self, test_env_servlet): resource = Resource(name="local-resource") resp = ObjStore.call_actor_method( - test_servlet, + test_env_servlet, "aput_local", key="key1", data=serialize_data(resource, "pickle"), @@ -78,6 +78,7 @@ def test_get_obj(self, test_env_servlet): def test_get_obj_remote(self, test_env_servlet): resp = ObjStore.call_actor_method( test_env_servlet, + "aget_local", key="key1", default=KeyError,