Skip to content

Commit

Permalink
Fix code indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesWrigley committed Nov 29, 2024
1 parent 66cb119 commit 132f0c3
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -223,29 +223,29 @@ end
@testset "ZMQ resource management" begin
local leaked_req_socket, leaked_rep_socket
ZMQ.Socket(ZMQ.REQ) do req_socket
leaked_req_socket = req_socket
leaked_req_socket = req_socket

ZMQ.Socket(ZMQ.REP) do rep_socket
leaked_rep_socket = rep_socket
ZMQ.Socket(ZMQ.REP) do rep_socket
leaked_rep_socket = rep_socket

ZMQ.bind(rep_socket, "inproc://tester")
ZMQ.connect(req_socket, "inproc://tester")
ZMQ.bind(rep_socket, "inproc://tester")
ZMQ.connect(req_socket, "inproc://tester")

ZMQ.send(req_socket, "Mr. Watson, come here, I want to see you.")
@test unsafe_string(ZMQ.recv(rep_socket)) == "Mr. Watson, come here, I want to see you."
ZMQ.send(rep_socket, "Coming, Mr. Bell.")
@test unsafe_string(ZMQ.recv(req_socket)) == "Coming, Mr. Bell."
end
ZMQ.send(req_socket, "Mr. Watson, come here, I want to see you.")
@test unsafe_string(ZMQ.recv(rep_socket)) == "Mr. Watson, come here, I want to see you."
ZMQ.send(rep_socket, "Coming, Mr. Bell.")
@test unsafe_string(ZMQ.recv(req_socket)) == "Coming, Mr. Bell."
end

@test !ZMQ.isopen(leaked_rep_socket)
@test !ZMQ.isopen(leaked_rep_socket)
end
@test !ZMQ.isopen(leaked_req_socket)

local leaked_ctx
ZMQ.Context() do ctx
leaked_ctx = ctx
leaked_ctx = ctx

@test isopen(ctx)
@test isopen(ctx)
end
@test !isopen(leaked_ctx)
end
Expand Down

0 comments on commit 132f0c3

Please sign in to comment.