From d34c44b6b5ed5ee4bd5774989f7244674e4878e3 Mon Sep 17 00:00:00 2001 From: Shizuo Fujita Date: Mon, 22 Sep 2025 12:47:23 +0900 Subject: [PATCH] test_supervisor: use expected temporary directory for tests (#5102) **Which issue(s) this PR fixes**: Fixes # **What this PR does / why we need it**: test_supervisor.rb uses a constant named `TMP_DIR`. However, the constant is not defined in this file, it is defined in another file. https://github.com/fluent/fluentd/blob/5a875090dde0222edf789422c7b2f27a828c72c3/test/config/test_dsl.rb#L5 This PR will use expected temporary directory for tests. **Docs Changes**: N/A **Release Note**: N/A Signed-off-by: Shizuo Fujita --- test/test_supervisor.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_supervisor.rb b/test/test_supervisor.rb index dbffa64eb7..5a77944364 100644 --- a/test/test_supervisor.rb +++ b/test/test_supervisor.rb @@ -495,7 +495,7 @@ def test_supervisor_event_dump_windows # https://github.com/fluent/fluentd/issues/4063 GC.start - ENV['SIGDUMP_PATH'] = TMP_DIR + "/sigdump.log" + ENV['SIGDUMP_PATH'] = @tmp_dir + "/sigdump.log" server = DummyServer.new def server.config @@ -513,7 +513,7 @@ def server.config server.stop_windows_event_thread end - result_filepaths = Dir.glob("#{TMP_DIR}/*") + result_filepaths = Dir.glob("#{@tmp_dir}/*") assert {result_filepaths.length > 0} ensure ENV.delete('SIGDUMP_PATH')