[Groonga-commit] groonga/grntest [master] Wait 1 second until groonga is shutdown

Back to archive index

null+****@clear***** null+****@clear*****
2012年 6月 7日 (木) 17:09:09 JST


Haruka Yoshihara	2012-06-07 17:09:09 +0900 (Thu, 07 Jun 2012)

  New Revision: 243c8cf29b946ead30d8b746b1e2a7ffd5a4a92f

  Log:
    Wait 1 second until groonga is shutdown

  Modified files:
    lib/groonga/tester.rb

  Modified: lib/groonga/tester.rb (+6 -1)
===================================================================
--- lib/groonga/tester.rb    2012-06-07 14:36:14 +0900 (c33d230)
+++ lib/groonga/tester.rb    2012-06-07 17:09:09 +0900 (c2b2dc6)
@@ -338,8 +338,13 @@ module Groonga
             executor.send_command("shutdown")
           rescue SystemCallError
           end
+
+          total_sleep_time = 0
+          sleep_time = 0.1
           while File.exist?(pid_file.path)
-            sleep(0.1)
+            sleep(sleep_time)
+            total_sleep_time += sleep_time
+            break if total_sleep_time > 1.0
           end
         end
       end




Groonga-commit メーリングリストの案内
Back to archive index