(t *testing.T)
| 143 | } |
| 144 | |
| 145 | func TestRowPoolRelease(t *testing.T) { |
| 146 | pool := newRowPool(5) |
| 147 | |
| 148 | // Get a row from the pool and populate it |
| 149 | row1 := pool.Get() |
| 150 | row1 = append(row1, parquet.ValueOf("value1")) |
| 151 | row1 = append(row1, parquet.ValueOf(42)) |
| 152 | row1 = append(row1, parquet.ValueOf(true)) |
| 153 | |
| 154 | pool.Put(row1) |
| 155 | |
| 156 | row2 := pool.Get() |
| 157 | |
| 158 | // Verify the reused row is properly cleared |
| 159 | assert.Len(t, row2, 0, "row should be empty after release") |
| 160 | assert.Equal(t, 5, cap(row2), "capacity should be preserved") |
| 161 | } |
nothing calls this directly
no test coverage detected