diff --git a/test/functional/cluster/connect.ts b/test/functional/cluster/connect.ts index a2346f23..c0caf114 100644 --- a/test/functional/cluster/connect.ts +++ b/test/functional/cluster/connect.ts @@ -391,7 +391,12 @@ describe("cluster:connect", () => { describe("multiple reconnect", () => { it("should reconnect after multiple consecutive disconnect(true) are called", (done) => { - new MockServer(30001); + const slotTable = [[0, 16383, ["127.0.0.1", 30001]]]; + new MockServer(30001, (argv) => { + if (argv[0] === "cluster" && argv[1] === "SLOTS") { + return slotTable; + } + }); const cluster = new Cluster([{ host: "127.0.0.1", port: "30001" }], { enableReadyCheck: false, }); diff --git a/test/functional/cluster/disconnection.ts b/test/functional/cluster/disconnection.ts index 40e33e01..1adafcb3 100644 --- a/test/functional/cluster/disconnection.ts +++ b/test/functional/cluster/disconnection.ts @@ -9,7 +9,12 @@ describe("disconnection", () => { }); it("should clear all timers on disconnect", (done) => { - const server = new MockServer(30000); + const slotTable = [[0, 16383, ["127.0.0.1", 30000]]]; + const server = new MockServer(30000, (argv) => { + if (argv[0] === "cluster" && argv[1] === "SLOTS") { + return slotTable; + } + }); const setIntervalCalls = sinon.spy(global, "setInterval"); const clearIntervalCalls = sinon.spy(global, "clearInterval");