Kouhei Sutou
null+****@clear*****
Wed Mar 11 23:51:56 JST 2015
Kouhei Sutou 2015-03-11 23:51:56 +0900 (Wed, 11 Mar 2015) New Revision: 74b595b77a1d17456283c86f2cdb7a3ec3500809 https://github.com/groonga/grntest/commit/74b595b77a1d17456283c86f2cdb7a3ec3500809 Message: Ensure trying graceful shutdown Modified files: lib/grntest/test-runner.rb Modified: lib/grntest/test-runner.rb (+4 -5) =================================================================== --- lib/grntest/test-runner.rb 2015-03-11 23:51:27 +0900 (763ff3e) +++ lib/grntest/test-runner.rb 2015-03-11 23:51:56 +0900 (355eb49) @@ -298,17 +298,16 @@ EOC retry end yield(executor) + ensure executor.shutdown if wait_groonga_http_shutdown(pid_file_path, shutdown_wait_timeout) pid = nil if wait_pid(pid, shutdown_wait_timeout) end - ensure - if pid - Process.kill(:TERM, pid) - wait_groonga_http_shutdown(pid_file_path, shutdown_wait_timeout) - end end ensure + return if pid.nil? + Process.kill(:TERM, pid) + wait_groonga_http_shutdown(pid_file_path, shutdown_wait_timeout) ensure_process_finished(pid) end end -------------- next part -------------- HTML����������������������������...Download