Skip to content

Commit 9099c9f

Browse files
authored
Backport(v1.19): test_supervisor: use expected temporary directory for tests (#5102) (#5136)
**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 <[email protected]>
1 parent f4d809c commit 9099c9f

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
@@ -495,7 +495,7 @@ def test_supervisor_event_dump_windows
495495
# https://github.com/fluent/fluentd/issues/4063
496496
GC.start
497497

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

500500
server = DummyServer.new
501501
def server.config
@@ -513,7 +513,7 @@ def server.config
513513
server.stop_windows_event_thread
514514
end
515515

516-
result_filepaths = Dir.glob("#{TMP_DIR}/*")
516+
result_filepaths = Dir.glob("#{@tmp_dir}/*")
517517
assert {result_filepaths.length > 0}
518518
ensure
519519
ENV.delete('SIGDUMP_PATH')

0 commit comments

Comments
 (0)