aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_pty.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_pty.rb')
-rw-r--r--test/test_pty.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/test_pty.rb b/test/test_pty.rb
index 6236e7c627..122fb6c13b 100644
--- a/test/test_pty.rb
+++ b/test/test_pty.rb
@@ -172,12 +172,13 @@ class TestPTY < Test::Unit::TestCase
st1 = PTY.check(pid)
w.close
r.close
- sleep(0.1)
- st2 = PTY.check(pid)
+ begin
+ sleep(0.1)
+ end until st2 = PTY.check(pid)
end
assert_equal(pid, st1.pid) if st1
assert_nil(st1)
- assert_equal(pid, st2.pid) if st2
+ assert_equal(pid, st2.pid)
end
def test_pty_check_raise