From d15a21128fffac9923134c80c00f9d5875d19fad Mon Sep 17 00:00:00 2001 From: Shizuo Fujita Date: Wed, 8 Jul 2026 11:34:29 +0900 Subject: [PATCH] test_buf_file_single: close leaked chunk (#5416) **Which issue(s) this PR fixes**: Fixes # **What this PR does / why we need it**: Missing `#purge` call causes file handle leaks. On Windows an open file cannot be deleted, so the leftover chunk file remained on disk and later sub_test_case teardowns using File.delete raised "Errno::EACCES: Permission denied" intermittently. **Docs Changes**: N/A **Release Note**: N/A Signed-off-by: Shizuo Fujita Signed-off-by: github-actions[bot] --- test/plugin/test_buf_file_single.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/plugin/test_buf_file_single.rb b/test/plugin/test_buf_file_single.rb index 56f9b643c9..52419dc668 100644 --- a/test/plugin/test_buf_file_single.rb +++ b/test/plugin/test_buf_file_single.rb @@ -142,6 +142,8 @@ def create_driver(conf = TAG_CONF, klass = FluentPluginFileSingleBufferTest::Dum chunk = p.generate_chunk(Fluent::Plugin::Buffer::Metadata.new(nil, nil, nil)) assert_equal 4 * 1024 * 1024, chunk.instance_variable_get(:@decompression_size_limit) + + chunk.purge end end