Skip to content

Commit

Permalink
last fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
avifenesh committed Oct 27, 2024
1 parent cf39a66 commit ae191e2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
16 changes: 10 additions & 6 deletions node/tests/GlideClusterClient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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], {
Expand Down Expand Up @@ -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();
},
Expand Down
2 changes: 1 addition & 1 deletion node/tests/SharedTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6434,7 +6434,7 @@ export function runBaseTests(config: {
[key3],
cluster.checkIfServerVersionLessThan("6.0.0")
? 1.0
: 0.001,
: 0.01,
),
).toBeNull();

Expand Down

0 comments on commit ae191e2

Please sign in to comment.