diff --git a/tests/dragonfly/cluster_test.py b/tests/dragonfly/cluster_test.py index 3201a169e04e..c59052789f2b 100644 --- a/tests/dragonfly/cluster_test.py +++ b/tests/dragonfly/cluster_test.py @@ -1011,7 +1011,7 @@ async def generate_config(): "slot_ranges": [{"start": s, "end": e} for (s, e) in node.slots], "master": { "id": await get_node_id(node.admin_client), - "ip": "localhost", + "ip": "127.0.0.1", "port": node.instance.port, }, "replicas": [], diff --git a/tests/dragonfly/utility.py b/tests/dragonfly/utility.py index 82eff776124b..b2176dad5bf3 100644 --- a/tests/dragonfly/utility.py +++ b/tests/dragonfly/utility.py @@ -448,7 +448,7 @@ def target(self, key_cnt): def _make_client(self, **kwargs): if self.cluster_mode: - return aioredis.RedisCluster(host="localhost", **kwargs) + return aioredis.RedisCluster(host="127.0.0.1", **kwargs) else: return aioredis.Redis(**kwargs)