Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GLib] Due to byte_allocated size returning 0, The TestMemoryPool-only test failed #45455

Closed
hiroyuki-sato opened this issue Feb 7, 2025 · 1 comment

Comments

@hiroyuki-sato
Copy link
Collaborator

hiroyuki-sato commented Feb 7, 2025

Describe the bug, including details regarding any error messages, version, and platform.

  • ../c_glib/test/run-test.sh: 100% pass (Because another unit tests used a memory pool)
  • ../c_glib/test/run-test.sh -t "TestMemoryPool": failed

source: deccce1

../c_glib/test/run-test.sh -t "TestMemoryPool"
ninja: no work to do.
Loaded suite test
Started
F
====================================================================================================================================================================================
Failure: test_bytes_allocated(TestMemoryPool):
        @memory_pool.bytes_allocated.positive?
        |            |               |
        |            |               false
        |            0
        #<Arrow::MemoryPool:0x000000011d67ebe8 ptr=0x0000600000effbe0>
/path/to/arrow/arrow/c_glib/test/test-memory-pool.rb:26:in 'TestMemoryPool#test_bytes_allocated'
     23:   end
     24:
     25:   def test_bytes_allocated
  => 26:     assert do
     27:       @memory_pool.bytes_allocated.positive?
     28:     end
     29:   end
====================================================================================================================================================================================
F
====================================================================================================================================================================================
Failure: test_max_memory(TestMemoryPool):
        @memory_pool.max_memory.positive?
        |            |          |
        |            |          false
        |            0
        #<Arrow::MemoryPool:0x000000012bab2ff8 ptr=0x0000600000e94190>
/path/to/arrow/c_glib/test/test-memory-pool.rb:32:in 'TestMemoryPool#test_max_memory'
     29:   end
     30:
     31:   def test_max_memory
  => 32:     assert do
     33:       @memory_pool.max_memory.positive?
     34:     end
     35:   end
====================================================================================================================================================================================
Finished in 0.015778 seconds.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
3 tests, 3 assertions, 2 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
33.3333% passed
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
190.14 tests/s, 190.14 assertions/s

Component(s)

GLib

kou added a commit that referenced this issue Feb 7, 2025
### 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]>
@kou kou added this to the 20.0.0 milestone Feb 7, 2025
@kou
Copy link
Member

kou commented Feb 7, 2025

Issue resolved by pull request 45456
#45456

@kou kou closed this as completed Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants