Skip to content

Commit

Permalink
Merge 3d2a995 into fe52ff1
Browse files Browse the repository at this point in the history
  • Loading branch information
luin committed Feb 12, 2023
2 parents fe52ff1 + 3d2a995 commit 18c7f37
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/autoPipelining.ts
Expand Up @@ -17,6 +17,7 @@ export const notAllowedAutoPipelineCommands = [
"psubscribe",
"unsubscribe",
"unpsubscribe",
"select",
];

function executeAutoPipeline(client, slotKey: string) {
Expand Down
10 changes: 10 additions & 0 deletions test/functional/autopipelining.ts
Expand Up @@ -31,6 +31,16 @@ describe("autoPipelining for single node", () => {
await promises;
});

it("should work with db parameter", async () => {
const redis = new Redis({ enableAutoPipelining: true, db: 1 });

redis.set("foo", "bar");
await new Promise((resolve) => {
redis.once("ready", resolve);
});
expect(await redis.get("foo")).to.eql("bar");
});

it("should not add blacklisted commands to auto pipelines", async () => {
const redis = new Redis({
enableAutoPipelining: true,
Expand Down

0 comments on commit 18c7f37

Please sign in to comment.