From 240ebc98a623a78a058c110a38d410686141f487 Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Fri, 7 Feb 2025 13:23:13 +0900 Subject: [PATCH] GH-45455: [GLib] Fix returns positive memory-pool utilization (#45456) ### Rationale for this change Due to byte_allocated size returning 0, The TestMemoryPool-only test failed. This issue did not occur when running other tests together because the other tests use the memory pool. ### What changes are included in this PR? Allocate a ResizableBuffer in the TestMemoryPool test. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: #45455 Lead-authored-by: Hiroyuki Sato Co-authored-by: Sutou Kouhei Signed-off-by: Sutou Kouhei --- c_glib/test/test-memory-pool.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/c_glib/test/test-memory-pool.rb b/c_glib/test/test-memory-pool.rb index 515edb0161399..b471437208503 100644 --- a/c_glib/test/test-memory-pool.rb +++ b/c_glib/test/test-memory-pool.rb @@ -20,6 +20,8 @@ class TestMemoryPool < Test::Unit::TestCase def setup @memory_pool = Arrow::MemoryPool.default + # Our tests assume that some memory is allocated. + @buffer = Arrow::ResizableBuffer.new(1) end def test_bytes_allocated