MCPcopy
hub / github.com/redis/redis-py / cluster_teardown

Function cluster_teardown

tests/conftest.py:437–446  ·  view source on GitHub ↗
(client, flushdb)

Source from the content-addressed store, hash-verified

435
436
437def cluster_teardown(client, flushdb):
438 if flushdb:
439 try:
440 client.flushdb(target_nodes="primaries")
441 except redis.ConnectionError:
442 # handle cases where a test disconnected a client
443 # just manually retry the flushdb
444 client.flushdb(target_nodes="primaries")
445 client.close()
446 client.disconnect_connection_pools()
447
448
449@pytest.fixture()

Callers 1

teardownFunction · 0.85

Calls 3

flushdbMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected