Skip to content

Commit 240ebc9

Browse files
hiroyuki-satokou
andauthored
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 <hiroysato@gmail.com> Co-authored-by: Sutou Kouhei <kou@cozmixng.org> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
1 parent 16c7f1a commit 240ebc9

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

c_glib/test/test-memory-pool.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ class TestMemoryPool < Test::Unit::TestCase
2020

2121
def setup
2222
@memory_pool = Arrow::MemoryPool.default
23+
# Our tests assume that some memory is allocated.
24+
@buffer = Arrow::ResizableBuffer.new(1)
2325
end
2426

2527
def test_bytes_allocated

0 commit comments

Comments
 (0)