Skip to content

Commit fe2d4da

Browse files
committed
More options for makeConnection test helper
1 parent 41224c2 commit fe2d4da

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

RMQClientTests/ConnectionHelper.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,17 @@
5151

5252
class ConnectionHelper {
5353
static func makeConnection(recoveryInterval interval: Int = 2,
54+
onlyErrors: Bool = true,
55+
attemptLimit: Int = 1,
5456
transport: RMQTCPSocketTransport,
5557
delegate: RMQConnectionDelegate) -> RMQConnection {
5658
let credentials = RMQCredentials(username: "guest", password: "guest")
5759
let allocator = RMQMultipleChannelAllocator(channelSyncTimeout: 10)
5860
let heartbeatSender = RMQGCDHeartbeatSender(transport: transport, clock: RMQTickingClock())
5961
let commandQueue = RMQGCDSerialQueue(name: "socket-recovery-test-queue")
6062
let recovery = RMQConnectionRecover(interval: interval,
61-
attemptLimit: 1,
62-
onlyErrors: true,
63+
attemptLimit: attemptLimit,
64+
onlyErrors: onlyErrors,
6365
heartbeatSender: heartbeatSender,
6466
commandQueue: commandQueue,
6567
delegate: delegate)

0 commit comments

Comments
 (0)