(t *testing.T)
| 8 | ) |
| 9 | |
| 10 | func TestResultPoolRelease(t *testing.T) { |
| 11 | pool := NewResultPool(5) |
| 12 | |
| 13 | // Get a result and populate it with data |
| 14 | result1 := pool.Get() |
| 15 | result1.AppendValue("key1", parquet.ValueOf("value1")) |
| 16 | result1.AppendValue("key2", parquet.ValueOf(42)) |
| 17 | result1.AppendOtherValue("other1", "othervalue1") |
| 18 | result1.AppendOtherValue("other2", 123) |
| 19 | |
| 20 | pool.Release(result1) |
| 21 | |
| 22 | result2 := pool.Get() |
| 23 | |
| 24 | // Verify the IteratorResult is properly cleared |
| 25 | assert.Equal(t, 0, len(result2.Entries), "Entries should be empty in reused result") |
| 26 | assert.Equal(t, 0, len(result2.OtherEntries), "OtherEntries should be empty in reused result") |
| 27 | } |
nothing calls this directly
no test coverage detected