Skip to content

Commit

Permalink
test flapping in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
aricart committed May 2, 2024
1 parent f7c41a8 commit d1a3fe8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/resub_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import { cleanup, setup } from "./helpers/mod.ts";
import { NatsConnectionImpl } from "../nats-base-client/nats.ts";
import {
assert,
assertEquals,
assertExists,
fail,
Expand Down Expand Up @@ -117,6 +118,7 @@ Deno.test("resub - removes server interest", async () => {
// nothing
},
});
await nc.flush();

const nci = nc as NatsConnectionImpl;
let sub = nci.protocol.subscriptions.all().find((s) => {
Expand All @@ -129,12 +131,13 @@ Deno.test("resub - removes server interest", async () => {

// change it
nci._resub(sub, "b");
await nc.flush();

// make sure we don't find a
sub = nci.protocol.subscriptions.all().find((s) => {
return s.subject === "a";
});
assertEquals(sub, undefined);
assert(sub === undefined);

// make sure we find b
sub = nci.protocol.subscriptions.all().find((s) => {
Expand Down

0 comments on commit d1a3fe8

Please sign in to comment.