Skip to content

Commit 7266b43

Browse files
author
magne
committed
chore: remove async from declareQueue
1 parent 4d1950d commit 7266b43

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/management.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const MANAGEMENT_NODE_CONFIGURATION: SenderOptions | ReceiverOptions = {
3131
}
3232

3333
export interface Management {
34-
declareQueue: (queueName: string, options: Partial<QueueOptions>) => Promise<QueueInfo>
34+
declareQueue: (queueName: string, options: Partial<QueueOptions>) => QueueInfo
3535
close: () => void
3636
}
3737

@@ -90,7 +90,7 @@ export class AmqpManagement implements Management {
9090
})
9191
}
9292

93-
async declareQueue(queueName: string, options: Partial<QueueOptions> = {}): Promise<QueueInfo> {
93+
declareQueue(queueName: string, options: Partial<QueueOptions> = {}): QueueInfo {
9494
// decode the response
9595
// create queueInfo
9696

test/e2e/management.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe("Management", () => {
2727
})
2828

2929
test("create a queue through the management", async () => {
30-
const queueInfo = await management.declareQueue("test-queue", { exclusive: true, auto_delete: false })
30+
const queueInfo = management.declareQueue("test-queue", { exclusive: true, auto_delete: false })
3131

3232
expect(queueInfo.name).to.eql("test-queue")
3333
await eventually(async () => {

0 commit comments

Comments
 (0)