This is an automated email from the ASF dual-hosted git repository.

zeroshade pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-go.git


The following commit(s) were added to refs/heads/main by this push:
     new d5ec308a ci: ensure extra GC cycle for flaky tests (#661)
d5ec308a is described below

commit d5ec308a107cfee2e64e3c176904f91bba6a7514
Author: Matt Topol <[email protected]>
AuthorDate: Tue Feb 10 13:51:53 2026 -0500

    ci: ensure extra GC cycle for flaky tests (#661)
    
    ### Rationale for this change
    Fix flakiness in test
    
    ### What changes are included in this PR?
    Ensure extra GC cycle for bloomfilter test
---
 parquet/metadata/bloom_filter_reader_test.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/parquet/metadata/bloom_filter_reader_test.go 
b/parquet/metadata/bloom_filter_reader_test.go
index fcf0df65..7ae7c39b 100644
--- a/parquet/metadata/bloom_filter_reader_test.go
+++ b/parquet/metadata/bloom_filter_reader_test.go
@@ -127,6 +127,7 @@ func (suite *BloomFilterBuilderSuite) TestSingleRowGroup() {
                        suite.True(bf1.CheckHash(metadata.GetHash(bf1.Hasher(), 
parquet.ByteArray("Hello"))))
                }
                runtime.GC() // force GC to run to put the buffer back into the 
pool
+               runtime.GC() // finalizers need two GC cycles to run reliably
                {
                        bf2, err := bfr.GetColumnBloomFilter(1)
                        suite.Require().NoError(err)
@@ -140,8 +141,10 @@ func (suite *BloomFilterBuilderSuite) TestSingleRowGroup() 
{
                        suite.True(bf3.CheckHash(metadata.GetHash(bf3.Hasher(), 
parquet.ByteArray("World"))))
                }
                runtime.GC() // we're using setfinalizer, so force release
+               runtime.GC() // finalizers need two GC cycles to run reliably
        }
        runtime.GC()
+       runtime.GC() // finalizers need two GC cycles to run reliably
 }
 
 const (
@@ -189,6 +192,7 @@ func (suite *EncryptedBloomFilterBuilderSuite) SetupTest() {
 
 func (suite *EncryptedBloomFilterBuilderSuite) TearDownTest() {
        runtime.GC() // we use setfinalizer to clean up the buffers, so run the 
GC
+       runtime.GC() // finalizers need two GC cycles to run reliably
        suite.mem.AssertSize(suite.T(), 0)
 }
 

Reply via email to