(t *testing.T)
| 123 | } |
| 124 | |
| 125 | func TestLinkPoolRelease(t *testing.T) { |
| 126 | // Get a link from the pool and populate it |
| 127 | link1 := getLink() |
| 128 | link1.attrs = append(link1.attrs, attrVal{ |
| 129 | a: traceql.NewAttribute("key1"), |
| 130 | s: traceql.NewStaticString("value1"), |
| 131 | }) |
| 132 | link1.attrs = append(link1.attrs, attrVal{ |
| 133 | a: traceql.NewAttribute("key2"), |
| 134 | s: traceql.NewStaticString("value2"), |
| 135 | }) |
| 136 | |
| 137 | putLink(link1) |
| 138 | |
| 139 | link2 := getLink() |
| 140 | |
| 141 | // Verify the reused link is properly cleared |
| 142 | assert.Len(t, link2.attrs, 0, "attrs should be cleared") |
| 143 | } |
| 144 | |
| 145 | func TestRowPoolRelease(t *testing.T) { |
| 146 | pool := newRowPool(5) |
nothing calls this directly
no test coverage detected