From c88841cf032e7fb822ad4e45c006c731645a4085 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 5890cbcac3..dccd3cc781 100644 --- a/test/test_supervisor.rb +++ b/test/test_supervisor.rb @@ -405,7 +405,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 @@ -423,7 +423,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')