Skip to content

Commit cf78401

Browse files
committed
skip tests
1 parent ff7847f commit cf78401

File tree

7 files changed

+142
-13
lines changed

7 files changed

+142
-13
lines changed

redis/_parsers/helpers.py

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -379,13 +379,21 @@ def parse_item(item):
379379
# an O(N) complexity) instead of the command.
380380
if isinstance(item[3], list):
381381
result["command"] = space.join(item[3])
382-
result["client_address"] = item[4]
383-
result["client_name"] = item[5]
382+
try:
383+
result["client_address"] = item[4]
384+
result["client_name"] = item[5]
385+
except IndexError:
386+
# The client address and name are not always present (in enterprise)
387+
pass
384388
else:
385389
result["complexity"] = item[3]
386390
result["command"] = space.join(item[4])
387-
result["client_address"] = item[5]
388-
result["client_name"] = item[6]
391+
try:
392+
result["client_address"] = item[5]
393+
result["client_name"] = item[6]
394+
except IndexError:
395+
# The client address and name are not always present (in enterprise)
396+
pass
389397
return result
390398

391399
return [parse_item(item) for item in response]
@@ -650,7 +658,11 @@ def parse_client_info(value):
650658
"omem",
651659
"tot-mem",
652660
}:
653-
client_info[int_key] = int(client_info[int_key])
661+
try:
662+
client_info[int_key] = int(client_info[int_key])
663+
except KeyError:
664+
# not all fields exist in enterprise
665+
pass
654666
return client_info
655667

656668

tests/test_asyncio/test_bloom.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from tests.conftest import (
88
assert_resp_response,
99
is_resp2_connection,
10+
skip_if_redis_enterprise,
1011
skip_ifmodversion_lt,
1112
)
1213

@@ -235,6 +236,7 @@ async def test_cms(decoded_r: redis.Redis):
235236

236237
@pytest.mark.redismod
237238
@pytest.mark.onlynoncluster
239+
@skip_if_redis_enterprise()
238240
async def test_cms_merge(decoded_r: redis.Redis):
239241
assert await decoded_r.cms().initbydim("A", 1000, 5)
240242
assert await decoded_r.cms().initbydim("B", 1000, 5)
@@ -366,6 +368,7 @@ async def test_tdigest_reset(decoded_r: redis.Redis):
366368

367369
@pytest.mark.redismod
368370
@pytest.mark.onlynoncluster
371+
@skip_if_redis_enterprise()
369372
async def test_tdigest_merge(decoded_r: redis.Redis):
370373
assert await decoded_r.tdigest().create("to-tDigest", 10)
371374
assert await decoded_r.tdigest().create("from-tDigest", 10)

0 commit comments

Comments
 (0)