Kouhei Sutou
null+****@clear*****
Wed Jan 4 15:23:08 JST 2017
Kouhei Sutou 2017-01-04 15:23:08 +0900 (Wed, 04 Jan 2017) New Revision: 2cfaa49e0a0427efb405a02f888d1086ac68a615 https://github.com/pgroonga/pgroonga/commit/2cfaa49e0a0427efb405a02f888d1086ac68a615 Message: test: use pg_ctl for shutting down postgres.exe on Windows Modified files: test/helpers/sandbox.rb Modified: test/helpers/sandbox.rb (+3 -10) =================================================================== --- test/helpers/sandbox.rb 2017-01-04 02:00:57 +0900 (1eb4349) +++ test/helpers/sandbox.rb 2017-01-04 15:23:08 +0900 (8cbf114) @@ -74,7 +74,7 @@ module Helpers def start_postgres @postgres_pid, @postgres_output, @postgres_error = - spawn_process("postgres", + spawn_process("pg_ctl", "start", "-D", @db_dir) loop do begin @@ -100,15 +100,8 @@ module Helpers def stop_postgres return if @postgres_pid.nil? - Process.kill(:TERM, @postgres_pid) - _, status = Process.waitpid2(@postgres_pid) - unless status.success? - puts("failed to stop postgres:") - puts("output:") - puts(@postgres_output.read) - puts("error:") - puts(@postgres_error.read) - end + run_command("pg_ctl", "stop", + "-D", @db_dir) end def setup_tmp_dir -------------- next part -------------- HTML����������������������������...Download