fsw: fix test timeout

Cause three events so we don't exhaust the output and sleep 2 in between
to make sure more than one event has bubbled up.

Closes #367.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
ilovezfs 2016-04-16 10:46:32 -07:00
parent a7df83ba4e
commit dba9136bbd

View file

@ -19,10 +19,18 @@ class Fsw < Formula
end
test do
io = IO.popen("fsw test")
(testpath/"test").write("foo")
assert_equal File.expand_path("test"), io.gets.strip
Process.kill "INT", io.pid
Process.wait io.pid
begin
io = IO.popen("fsw test")
(testpath/"test").write("foo")
sleep 2
rm testpath/"test"
sleep 2
(testpath/"test").write("foo")
sleep 2
assert_equal File.expand_path("test"), io.gets.strip
ensure
Process.kill "INT", io.pid
Process.wait io.pid
end
end
end