Skip to content

Commit 6d26f8d

Browse files
authored
Backport(v1.16): test_supervisor: use expected temporary directory for tests (#5102) (#5135)
**Which issue(s) this PR fixes**: * Backport #5102 **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 <!-- Thank you for contributing to Fluentd! Your commits need to follow DCO: https://probot.github.io/apps/dco/ And please provide the following information to help us make the most of your pull request: --> **Which issue(s) this PR fixes**: Fixes # **What this PR does / why we need it**: **Docs Changes**: **Release Note**: Signed-off-by: Shizuo Fujita <fujita@clear-code.com>
1 parent 5114da6 commit 6d26f8d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/test_supervisor.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ def test_supervisor_event_dump_windows
405405
# https://github.com/fluent/fluentd/issues/4063
406406
GC.start
407407

408-
ENV['SIGDUMP_PATH'] = TMP_DIR + "/sigdump.log"
408+
ENV['SIGDUMP_PATH'] = @tmp_dir + "/sigdump.log"
409409

410410
server = DummyServer.new
411411
def server.config
@@ -423,7 +423,7 @@ def server.config
423423
server.stop_windows_event_thread
424424
end
425425

426-
result_filepaths = Dir.glob("#{TMP_DIR}/*")
426+
result_filepaths = Dir.glob("#{@tmp_dir}/*")
427427
assert {result_filepaths.length > 0}
428428
ensure
429429
ENV.delete('SIGDUMP_PATH')

0 commit comments

Comments
 (0)