Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into consumer-num_replicas
Browse files Browse the repository at this point in the history
# Conflicts:
#	nats-base-client/jsconsumeropts.ts
#	nats-base-client/types.ts
#	tests/jetstream_test.ts
  • Loading branch information
aricart committed Jul 28, 2022
1 parent 0c592ab commit 7093818
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/jetstream_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3579,3 +3579,24 @@ Deno.test("jetstream - num_replicas consumer option", async () => {
// in ci this hangs
await delay(500);
});

Deno.test("jetstream - filter_subject consumer update", async () => {
const { ns, nc } = await setup(jetstreamServerConf({}, true));
if (await notCompatible(ns, nc, "2.9.0")) {
return;
}

const jsm = await nc.jetstreamManager();
const si = await jsm.streams.add({ name: nuid.next(), subjects: ["foo.>"] });
let ci = await jsm.consumers.add(si.config.name, {
ack_policy: AckPolicy.Explicit,
filter_subject: "foo.bar",
durable_name: "a",
});
assertEquals(ci.config.filter_subject, "foo.bar");

ci.config.filter_subject = "foo.baz";
ci = await jsm.consumers.update(si.config.name, "a", ci.config);
assertEquals(ci.config.filter_subject, "foo.baz");
await cleanup(ns, nc);
});

0 comments on commit 7093818

Please sign in to comment.