Kouhei Sutou
null+****@clear*****
Wed Jul 16 22:43:26 JST 2014
Kouhei Sutou 2014-07-16 22:43:26 +0900 (Wed, 16 Jul 2014) New Revision: bc83c2c21face7fde2ff10b67b2ff2b680215858 https://github.com/droonga/drntest/commit/bc83c2c21face7fde2ff10b67b2ff2b680215858 Message: Add workaround for a bug of droonga-engine Droonga-engine can't shutdown correctly when it is just started. If a test is omitted, the case is occurred. Modified files: lib/drntest/engine.rb Modified: lib/drntest/engine.rb (+9 -0) =================================================================== --- lib/drntest/engine.rb 2014-07-15 22:56:34 +0900 (b9c844c) +++ lib/drntest/engine.rb 2014-07-16 22:43:26 +0900 (75a2241) @@ -124,9 +124,18 @@ module Drntest @pid = Process.spawn(*arguments) wait_until_ready + @ready_time = Time.now end def teardown + # TODO: REMOVE ME. Workaround for kill -TERM shutdown failure of + # omit tests. + running_time = Time.now - @ready_time + least_running_time = 1 + if running_time < least_running_time + sleep(least_running_time - running_time) + end + Process.kill(:TERM, @pid) Process.wait(@pid) -------------- next part -------------- HTML����������������������������... 下载