Skip to content

Commit

Permalink
Fix failing Node test
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Louie <[email protected]>
  • Loading branch information
jonathanl-bq committed Jan 8, 2025
1 parent 7928f92 commit 1a0c1c0
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions node/tests/GlideClusterClient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import {
SlotKeyTypes,
SortOrder,
convertRecordToGlideRecord,
convertGlideRecordToRecord,
} from "..";
import { ValkeyCluster } from "../../utils/TestUtils";
import { runBaseTests } from "./SharedTests";
Expand Down Expand Up @@ -332,21 +333,16 @@ describe("GlideClusterClient", () => {
})
.configGet(["timeout", "cluster-node-timeout"]);
const result = await client.exec(transaction);
const sortedResult = result.sort((a, b) => {
if (a.key < b.key) {
return -1;
} else if (a.key > b.key) {
return 1;
} else {
return 0;
}
});
expect(sortedResult).toEqual([
const convertedResult = [
result[0],
convertGlideRecordToRecord(result[1]),
];
expect(convertedResult).toEqual([
"OK",
convertRecordToGlideRecord({
"cluster-node-timeout": "16000",
{
timeout: "2000",
}),
"cluster-node-timeout": "16000",
},
]);
}
},
Expand Down

0 comments on commit 1a0c1c0

Please sign in to comment.