null+****@clear*****
null+****@clear*****
2012年 6月 13日 (水) 11:34:18 JST
Haruka Yoshihara 2012-06-13 11:34:18 +0900 (Wed, 13 Jun 2012)
New Revision: 108ebe42b596c75e49432201ab5b2044446a22c7
Log:
Extract the method to wait one second until groonga is shutdown
Modified files:
lib/groonga/tester.rb
Modified: lib/groonga/tester.rb (+5 -1)
===================================================================
--- lib/groonga/tester.rb 2012-06-13 11:18:46 +0900 (f5d27e6)
+++ lib/groonga/tester.rb 2012-06-13 11:34:18 +0900 (bd8c2c9)
@@ -344,6 +344,11 @@ module Groonga
rescue SystemCallError
end
+ wait_groonga_http_shutdown(pid_file)
+ end
+ end
+
+ def wait_groonga_http_shutdown(pid_file)
total_sleep_time = 0
sleep_time = 0.1
while File.exist?(pid_file.path)
@@ -351,7 +356,6 @@ module Groonga
total_sleep_time += sleep_time
break if total_sleep_time > 1.0
end
- end
end
def groonga_http_command(host, port, pid_file, context)