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:
parent
a7df83ba4e
commit
dba9136bbd
1 changed files with 13 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue