From b3991d8f7037c3a3c3b2f29b9f1151e991d64647 Mon Sep 17 00:00:00 2001 From: Igor Cappello Date: Tue, 19 Dec 2023 15:11:53 +0100 Subject: [PATCH] fix: use get property instead of method to retrieve current frameMax value in connection --- src/connection.ts | 2 +- test/e2e/connect_frame_size_negotiation.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/connection.ts b/src/connection.ts index e043c036..b9707575 100644 --- a/src/connection.ts +++ b/src/connection.ts @@ -235,7 +235,7 @@ export class Connection { return this.consumers.size } - public savedFrameMax() { + public get currentFrameMax() { return this.frameMax } diff --git a/test/e2e/connect_frame_size_negotiation.test.ts b/test/e2e/connect_frame_size_negotiation.test.ts index a3a818fa..9c08cebf 100644 --- a/test/e2e/connect_frame_size_negotiation.test.ts +++ b/test/e2e/connect_frame_size_negotiation.test.ts @@ -12,7 +12,7 @@ describe("connect frame size negotiation", () => { const connection = await createConnection(username, password, undefined, frameMax) await eventually(async () => { - expect(connection.savedFrameMax()).lte(frameMax) + expect(connection.currentFrameMax).lte(frameMax) expect(await rabbit.getConnections()).lengthOf(1) }, 5000) try { @@ -27,7 +27,7 @@ describe("connect frame size negotiation", () => { const connection = await createConnection(username, password, undefined, frameMax) await eventually(async () => { - expect(connection.savedFrameMax()).lte(frameMax) + expect(connection.currentFrameMax).lte(frameMax) expect(await rabbit.getConnections()).lengthOf(1) }, 5000) try {