1
0
mirror of https://github.com/redis/node-redis.git synced 2025-12-11 09:22:35 +03:00

feat: add cluster/node events (#1855) (#3083)

* add cluster/node events
* add test for cluster events positive branch
* add cluster events docs section

fixes: #1855

---------

Co-authored-by: Nikolay Karadzhov <nkaradzhov89@gmail.com>
This commit is contained in:
Trofymenko Vladyslav
2025-10-09 16:06:57 +03:00
committed by GitHub
parent d6d8d8e8ed
commit bd11e382d0
4 changed files with 86 additions and 12 deletions

View File

@@ -116,6 +116,7 @@ interface ClusterTestOptions<
clusterConfiguration?: Partial<RedisClusterOptions<M, F, S, RESP, TYPE_MAPPING/*, POLICIES*/>>;
numberOfMasters?: number;
numberOfReplicas?: number;
disableClusterSetup?: boolean;
}
interface AllTestOptions<
@@ -554,10 +555,14 @@ export default class TestUtils {
port
}
})),
minimizeConnections: true,
minimizeConnections: options.clusterConfiguration?.minimizeConnections ?? true,
...options.clusterConfiguration
});
if(options.disableClusterSetup) {
return fn(cluster);
}
await cluster.connect();
try {