Skip to content

feat: remove redis ping #99

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/corva/cache_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,6 @@ def __init__(
self.default_name = hash_name
self.client = client

self.client.ping()

@overload
def hset(
self,
Expand Down
8 changes: 0 additions & 8 deletions tests/unit/state/test_redis_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import fakeredis
import pytest
from freezegun import freeze_time
from redis import ConnectionError, Redis

from corva.cache_adapter import DeprecatedRedisAdapter
from corva.configuration import SETTINGS
Expand All @@ -25,13 +24,6 @@ def test_connect(redis_adapter):
assert redis_adapter.client.ping()


def test_init_connect_exc():
fake_cache_url = 'redis://random:123'

with pytest.raises(ConnectionError):
DeprecatedRedisAdapter(hash_name='name', client=Redis.from_url(fake_cache_url))


@pytest.mark.parametrize('name', (None, NAME))
def test_hset_and_hget(redis_adapter, name):
assert redis_adapter.hset(name=name, key=KEY, value=VAL) == 1
Expand Down
Loading