Skip to content

Commit 51b97a6

Browse files
committed
Close connection properly in integration tests
1 parent c5a9d02 commit 51b97a6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

RMQClientIntegrationTests/IntegrationTests.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,8 @@ class IntegrationTests: XCTestCase {
204204
let delegate = ConnectionDelegateSpy()
205205
let conn = RMQConnection(delegate: delegate)
206206
conn.start()
207+
defer { conn.blockingClose() }
208+
207209
let ch = conn.createChannel()
208210

209211
ch.close()
@@ -220,6 +222,8 @@ class IntegrationTests: XCTestCase {
220222
let delegate = ConnectionDelegateSpy()
221223
let conn = RMQConnection(delegate: delegate)
222224
conn.start()
225+
defer { conn.blockingClose() }
226+
223227
let ch = conn.createChannel()
224228

225229
causeServerChannelClose(ch)

0 commit comments

Comments
 (0)