@@ -25,13 +25,16 @@ function runtests(;virtualhost="/", host="localhost", port=AMQPClient.AMQP_DEFAU
25
25
# open a connection
26
26
@info (" opening connection" )
27
27
connection (;virtualhost= virtualhost, host= host, port= port, amqps= amqps, auth_params= auth_params, send_queue_size= 512 , keepalive= keepalive, heartbeat= heartbeat) do conn
28
- @test conn. conn. sendq. sz_max == 512
28
+ # Issue #51
29
+ @test isa (conn, AMQPClient. Connection)
30
+
31
+ @test conn. sendq. sz_max == 512
29
32
30
33
# open a channel
31
34
@info (" opening channel" )
32
35
channel (conn, AMQPClient. UNUSED_CHANNEL, true ) do chan1
33
36
@test chan1. id == 1
34
- @test conn. conn . sendq. sz_max == 512
37
+ @test conn. sendq. sz_max == 512
35
38
36
39
# test default exchange names
37
40
@test default_exchange_name () == " "
@@ -168,8 +171,8 @@ function runtests(;virtualhost="/", host="localhost", port=AMQPClient.AMQP_DEFAU
168
171
@test tx_rollback (chan1)
169
172
170
173
# test heartbeats
171
- if 120 >= conn. conn . heartbeat > 0
172
- c = conn. conn
174
+ if 120 >= conn. heartbeat > 0
175
+ c = conn
173
176
@info (" testing heartbeats (waiting $(3 * c. heartbeat) secs)..." )
174
177
ts1 = c. heartbeat_time_server
175
178
tc1 = c. heartbeat_time_client
@@ -180,10 +183,10 @@ function runtests(;virtualhost="/", host="localhost", port=AMQPClient.AMQP_DEFAU
180
183
end
181
184
@test c. heartbeat_time_server > ts1
182
185
@test c. heartbeat_time_client > tc1
183
- elseif conn. conn . heartbeat == 0
186
+ elseif conn. heartbeat == 0
184
187
@info (" heartbeat disabled" )
185
188
else
186
- @info (" not testing heartbeats (wait too long at $(3 * conn. conn . heartbeat) secs)" )
189
+ @info (" not testing heartbeats (wait too long at $(3 * conn. heartbeat) secs)" )
187
190
end
188
191
189
192
@info (" closing down" )
0 commit comments