-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
59 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { expect } from "chai" | ||
import { createConnection } from "../support/fake_data" | ||
import { Rabbit } from "../support/rabbit" | ||
import { eventually, username, password } from "../support/util" | ||
|
||
describe("connect frame size negotiation", () => { | ||
const rabbit = new Rabbit(username, password) | ||
|
||
it("using 65536 as frameMax", async () => { | ||
const frameMax = 65536 | ||
|
||
const connection = await createConnection(username, password, undefined, frameMax) | ||
|
||
await eventually(async () => { | ||
expect(connection.savedFrameMax()).lte(frameMax) | ||
expect(await rabbit.getConnections()).lengthOf(1) | ||
}, 5000) | ||
try { | ||
await connection.close() | ||
await rabbit.closeAllConnections() | ||
} catch (e) {} | ||
}).timeout(10000) | ||
|
||
it("using 1024 as frameMax", async () => { | ||
const frameMax = 1024 | ||
|
||
const connection = await createConnection(username, password, undefined, frameMax) | ||
|
||
await eventually(async () => { | ||
expect(connection.savedFrameMax()).lte(frameMax) | ||
expect(await rabbit.getConnections()).lengthOf(1) | ||
}, 5000) | ||
try { | ||
await connection.close() | ||
await rabbit.closeAllConnections() | ||
} catch (e) {} | ||
}).timeout(10000) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters