From 5a13c39ccdff6ccedc57cce725b7ae67815616d1 Mon Sep 17 00:00:00 2001 From: Ali-Akber Saifee Date: Thu, 5 Dec 2024 11:20:07 -0800 Subject: [PATCH] Exclude latency tests for keydb/redict --- tests/commands/test_acl.py | 1 + tests/commands/test_connection.py | 1 + tests/commands/test_generic.py | 2 ++ tests/commands/test_server.py | 8 +++++++- 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/commands/test_acl.py b/tests/commands/test_acl.py index 4d671a3d..927b0da6 100644 --- a/tests/commands/test_acl.py +++ b/tests/commands/test_acl.py @@ -59,6 +59,7 @@ async def test_acl_load(self, client): await client.acl_load() @pytest.mark.min_server_version("6.0.0") + @pytest.mark.nokeydb @pytest.mark.nocluster async def test_acl_log(self, client, _s): with pytest.warns(UserWarning): diff --git a/tests/commands/test_connection.py b/tests/commands/test_connection.py index a2fb099a..380dfcc1 100644 --- a/tests/commands/test_connection.py +++ b/tests/commands/test_connection.py @@ -258,6 +258,7 @@ async def test_client_setname(self, client, _s): assert await client.client_setname("redis_py_test") assert await client.client_getname() == _s("redis_py_test") + @pytest.mark.nokeydb async def test_client_pause(self, client, event_loop): key = "key_should_expire" another_client = coredis.Redis(loop=event_loop) diff --git a/tests/commands/test_generic.py b/tests/commands/test_generic.py index 7f7c3092..0e84bd6d 100644 --- a/tests/commands/test_generic.py +++ b/tests/commands/test_generic.py @@ -216,6 +216,7 @@ async def test_dump_and_restore_with_freq(self, client, _s): freq_now = await client.object_freq("a") assert freq + 1 == freq_now + @pytest.mark.nokeydb @pytest.mark.novalkey @pytest.mark.noredict async def test_dump_and_restore_with_idle_time(self, client, _s): @@ -375,6 +376,7 @@ async def test_object_encoding_listpack(self, client, _s): assert await client.object_encoding("a") == _s("embstr") assert await client.object_encoding("b") == _s("listpack") + @pytest.mark.nokeydb @pytest.mark.novalkey @pytest.mark.noredict async def test_object_freq(self, client, _s): diff --git a/tests/commands/test_server.py b/tests/commands/test_server.py index c4a9175a..71385e55 100644 --- a/tests/commands/test_server.py +++ b/tests/commands/test_server.py @@ -246,9 +246,10 @@ async def test_lastsave(self, client, _s): @pytest.mark.min_server_version("6.0.0") @pytest.mark.nocluster + @pytest.mark.nokeydb async def test_lolwut(self, client, _s): lolwut = await client.lolwut(5) - assert _s("Redis ver.") in lolwut + assert _s("ver.") in lolwut @pytest.mark.nocluster async def test_memory_doctor(self, client, _s): @@ -272,10 +273,13 @@ async def test_memory_usage(self, client, _s): assert (await client.memory_usage(_s("key"), samples=1)) > 1024 @pytest.mark.nocluster + @pytest.mark.nokeydb async def test_latency_doctor(self, client, _s): assert await client.latency_doctor() @pytest.mark.nocluster + @pytest.mark.nokeydb + @pytest.mark.noredict async def test_latency_all(self, client, _s): await client.execute_command(b"debug", "sleep", 0.05) history = await client.latency_history("command") @@ -291,6 +295,8 @@ async def test_latency_all(self, client, _s): assert latest[_s("command")][2] == approx(50, 60) @pytest.mark.nocluster + @pytest.mark.nokeydb + @pytest.mark.noredict async def test_latency_graph(self, client, _s): await client.execute_command(b"debug", "sleep", 0.05) graph = await client.latency_graph("command")