Kouhei Sutou
null+****@clear*****
Fri Aug 7 12:51:19 JST 2015
Kouhei Sutou 2015-08-07 12:51:19 +0900 (Fri, 07 Aug 2015) New Revision: 691565b8875323bc6e011f467667449454e16a82 https://github.com/groonga/grntest/commit/691565b8875323bc6e011f467667449454e16a82 Message: Add sleep directive It's useful to test cache. TODO: * Document me Modified files: lib/grntest/executors/base-executor.rb Modified: lib/grntest/executors/base-executor.rb (+7 -0) =================================================================== --- lib/grntest/executors/base-executor.rb 2015-07-09 10:02:59 +0900 (792c049) +++ lib/grntest/executors/base-executor.rb 2015-08-07 12:51:19 +0900 (e2604eb) @@ -210,6 +210,11 @@ module Grntest level[0] end + def execute_directive_sleep(line, content, options) + time = options[0].to_f + sleep(time) if time >= 0 + end + def execute_directive(line, content) command, *options = Shellwords.split(content) case command @@ -233,6 +238,8 @@ module Grntest execute_directive_add_important_log_levels(line, content, options) when "remove-important-log-levels" execute_directive_remove_important_log_levels(line, content, options) + when "sleep" + execute_directive_sleep(line, content, options) else log_input(line) log_error("#|e| unknown directive: <#{command}>") -------------- next part -------------- HTML����������������������������...Download