1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00
This commit is contained in:
Leibale
2023-10-02 12:03:04 -04:00
parent d62e332470
commit 225efc0b43
19 changed files with 386 additions and 422 deletions

View File

@@ -200,9 +200,9 @@ export default class TestUtils {
// POLICIES extends CommandPolicies
>(cluster: RedisClusterType<M, F, S, RESP, TYPE_MAPPING/*, POLICIES*/>): Promise<unknown> {
return Promise.all(
cluster.masters.map(async ({ client }) => {
if (client) {
await (await client).flushAll();
cluster.masters.map(async master => {
if (master.client) {
(await cluster.nodeClient(master)).flushAll();
}
})
);
@@ -256,7 +256,7 @@ export default class TestUtils {
await fn(cluster);
} finally {
await TestUtils.#clusterFlushAll(cluster);
await cluster.disconnect();
cluster.destroy();
}
});
}