From a8659e8dc85e92285f5e090f10327b6090b5b042 Mon Sep 17 00:00:00 2001 From: Daijiro Fukuda Date: Sat, 18 Feb 2023 22:54:22 +0900 Subject: [PATCH] TEST: Don't use SIGTERM on Windows On Windows, unnecessary timeout always occurred. This fix reduce the test time of `TestFluentdCommand`. Signed-off-by: Daijiro Fukuda --- test/command/test_fluentd.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/command/test_fluentd.rb b/test/command/test_fluentd.rb index 5719055521..5f73110017 100644 --- a/test/command/test_fluentd.rb +++ b/test/command/test_fluentd.rb @@ -72,6 +72,11 @@ def create_cmdline(conf_path, *fluentd_options) end def process_kill(pid) + if Fluent.windows? + Process.kill(:KILL, pid) rescue nil + return + end + begin Process.kill(:TERM, pid) rescue nil Timeout.timeout(10){ sleep 0.1 while process_exist?(pid) }