Skip to content

Commit

Permalink
GH-45455: [GLib] Fix returns positive memory-pool utilization (#45456)
Browse files Browse the repository at this point in the history
### 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 <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
  • Loading branch information
hiroyuki-sato and kou authored Feb 7, 2025
1 parent 16c7f1a commit 240ebc9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions c_glib/test/test-memory-pool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 240ebc9

Please sign in to comment.