Kouhei Sutou
null+****@clear*****
Wed Jan 4 15:43:22 JST 2017
Kouhei Sutou 2017-01-04 15:43:22 +0900 (Wed, 04 Jan 2017) New Revision: d2469d13260745008b03e6104f509115666e8340 https://github.com/pgroonga/pgroonga/commit/d2469d13260745008b03e6104f509115666e8340 Message: test: ensure waiting postgres started Modified files: test/helpers/sandbox.rb Modified: test/helpers/sandbox.rb (+10 -0) =================================================================== --- test/helpers/sandbox.rb 2017-01-04 15:42:50 +0900 (61be570) +++ test/helpers/sandbox.rb 2017-01-04 15:43:22 +0900 (d575fe1) @@ -81,6 +81,16 @@ module Helpers @postgres_is_running = false run_command("pg_ctl", "start", "-D", @db_dir) + loop do + begin + TCPSocket.open(@host, @port) do + end + rescue SystemCallError + sleep(0.1) + else + break + end + end @postgres_is_running = true end -------------- next part -------------- HTML����������������������������...Download