Skip to content

Commit

Permalink
nanomsg: remove process.kill/wait from test
Browse files Browse the repository at this point in the history
  • Loading branch information
samford authored May 25, 2020
1 parent a1759e8 commit 21e48fc
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions Formula/nanomsg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,12 @@ def install
test do
bind = "tcp://127.0.0.1:#{free_port}"

pid = fork do
fork do
exec "#{bin}/nanocat --rep --bind #{bind} --format ascii --data home"
end
sleep 2

begin
output = shell_output("#{bin}/nanocat --req --connect #{bind} --format ascii --data brew")
assert_match /home/, output
ensure
Process.kill("SIGINT", pid)
Process.wait(pid)
end
output = shell_output("#{bin}/nanocat --req --connect #{bind} --format ascii --data brew")
assert_match /home/, output
end
end

0 comments on commit 21e48fc

Please sign in to comment.