From fa5d9473deaa345e5ca76375fbe21aaae3516b89 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 29 Mar 2009 22:56:21 -0700 Subject: test_exec: fix another race condition --- test/exec/test_exec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/exec/test_exec.rb b/test/exec/test_exec.rb index 7ce0637..2d0528f 100644 --- a/test/exec/test_exec.rb +++ b/test/exec/test_exec.rb @@ -215,13 +215,13 @@ end rescue Errno::ENOENT (sleep(DEFAULT_RES) and (tries -= 1) > 0) and retry end - assert_equal current_pid, File.read(pid_file).to_i tries = DEFAULT_TRIES while File.exist?(old_file) (sleep(DEFAULT_RES) and (tries -= 1) > 0) or break end assert ! File.exist?(old_file), "oldbin=#{old_file} gone" + assert_equal current_pid, File.read(pid_file).to_i # fix the bug File.open("config.ru", "wb") { |fp| fp.syswrite(HI) } -- cgit v1.2.3-24-ge0c7