Skip to content

Commit

Permalink
remove client logging
Browse files Browse the repository at this point in the history
[FIX] [TEST] fixed flappers
  • Loading branch information
aricart committed Jan 12, 2023
1 parent f9ebbf5 commit 02089a3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
4 changes: 1 addition & 3 deletions tests/auth_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1119,8 +1119,6 @@ Deno.test("auth - ignore auth error abort", async () => {

Deno.test("auth - sub with permission error discards", async () => {
const { ns, nc } = await setup({
debug: true,
trace: true,
authorization: {
users: [{
user: "a",
Expand All @@ -1132,7 +1130,7 @@ Deno.test("auth - sub with permission error discards", async () => {
},
}],
},
}, { user: "a", pass: "a", debug: true });
}, { user: "a", pass: "a" });

const nci = nc as NatsConnectionImpl;

Expand Down
2 changes: 2 additions & 0 deletions tests/authenticator_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,8 @@ Deno.test("authenticator - creds fn", async () => {
}, 2000);

await cycle;
await nc.flush();

assertEquals(nc.isClosed(), false);
await cleanup(ns, nc);
});
12 changes: 4 additions & 8 deletions tests/jetstream_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2873,12 +2873,9 @@ Deno.test("jetstream - bind", async () => {
`unable to bind - durable consumer hello doesn't exist in ${stream}`,
undefined,
);

nc.subscribe("$JS.API.CONSUMER.DURABLE.CREATE.>", {
callback: (_err, _msg) => {
// this will count
},
});
// the rejection happens and the unsub is scheduled, but it is possible that
// the server didn't process it yet - flush to make sure the unsub was seen
await nc.flush();

opts.bind(stream, "me");
const sub = await js.subscribe(subj, opts);
Expand Down Expand Up @@ -3322,7 +3319,7 @@ Deno.test("jetstream - ephemeral pull consumer", async () => {
await nc.flush();

const jsm = await nc.jetstreamManager();
await delay(1000);
await delay(1500);
await assertRejects(
async () => {
await jsm.consumers.info(stream, old.name);
Expand Down Expand Up @@ -3857,7 +3854,6 @@ Deno.test("jetstream - fetch on stopped server doesn't close client", async () =
(async () => {
let reconnects = 0;
for await (const s of nc.status()) {
console.log(s);
switch (s.type) {
case DebugEvents.Reconnecting:
reconnects++;
Expand Down

0 comments on commit 02089a3

Please sign in to comment.