diff --git a/node/tests/GlideClusterClient.test.ts b/node/tests/GlideClusterClient.test.ts index f605271bb0..ba228403de 100644 --- a/node/tests/GlideClusterClient.test.ts +++ b/node/tests/GlideClusterClient.test.ts @@ -245,7 +245,7 @@ describe("GlideClusterClient", () => { expect(await client.set(key, value)).toEqual("OK"); // Since DUMP gets binary results, we cannot use the default decoder (string) here, so we expected to get an error. await expect(client.customCommand(["DUMP", key])).rejects.toThrow( - "invalid utf-8 sequence of 1 bytes from index 9", + "invalid utf-8 sequence of 1 bytes from index", ); const dumpResult = await client.customCommand(["DUMP", key], { @@ -450,11 +450,15 @@ describe("GlideClusterClient", () => { ); } - for (const promise of promises) { - await expect(promise).rejects.toThrowError( - /Keys in request don't hash to the same slot/, - ); - } + await Promise.allSettled(promises).then((results) => { + results.forEach((result) => { + expect(result.status).toBe("rejected"); + + if (result.status === "rejected") { + expect(result.reason.message).toContain("CrossSlot"); + } + }); + }); client.close(); }, diff --git a/node/tests/SharedTests.ts b/node/tests/SharedTests.ts index 8ab62febab..d40402b2a1 100644 --- a/node/tests/SharedTests.ts +++ b/node/tests/SharedTests.ts @@ -6434,7 +6434,7 @@ export function runBaseTests(config: { [key3], cluster.checkIfServerVersionLessThan("6.0.0") ? 1.0 - : 0.001, + : 0.01, ), ).toBeNull();