(t *testing.T)
| 103 | } |
| 104 | |
| 105 | func TestEventPoolRelease(t *testing.T) { |
| 106 | // Get an event from the pool and populate it |
| 107 | event1 := getEvent() |
| 108 | event1.attrs = append(event1.attrs, attrVal{ |
| 109 | a: traceql.NewAttribute("key1"), |
| 110 | s: traceql.NewStaticString("value1"), |
| 111 | }) |
| 112 | event1.attrs = append(event1.attrs, attrVal{ |
| 113 | a: traceql.NewAttribute("key2"), |
| 114 | s: traceql.NewStaticString("value2"), |
| 115 | }) |
| 116 | |
| 117 | putEvent(event1) |
| 118 | |
| 119 | event2 := getEvent() |
| 120 | |
| 121 | // Verify the reused event is properly cleared |
| 122 | assert.Len(t, event2.attrs, 0, "attrs should be cleared") |
| 123 | } |
| 124 | |
| 125 | func TestLinkPoolRelease(t *testing.T) { |
| 126 | // Get a link from the pool and populate it |
nothing calls this directly
no test coverage detected