MCPcopy
hub / github.com/gofiber/fiber / TestDefaultCtx_signalReleased_NoReclaim

Function TestDefaultCtx_signalReleased_NoReclaim

ctx_reclaim_test.go:107–112  ·  view source on GitHub ↗

TestDefaultCtx_signalReleased_NoReclaim guards that calling signalReleased on a context that was never armed for reclamation is a safe no-op. This is the SSE-style path (Abandon without ScheduleReclaim) hit through ReleaseCtx.

(t *testing.T)

Source from the content-addressed store, hash-verified

105// a context that was never armed for reclamation is a safe no-op. This is the
106// SSE-style path (Abandon without ScheduleReclaim) hit through ReleaseCtx.
107func TestDefaultCtx_signalReleased_NoReclaim(t *testing.T) {
108 t.Parallel()
109 _, c := acquireReclaimTestCtx(t)
110 require.NotPanics(t, func() { c.signalReleased() })
111 require.NotPanics(t, func() { c.signalReleased() })
112}
113
114// TestDefaultCtx_signalReleased_Idempotent guards the sync.Once semantics: even
115// if the request release path fires multiple times, the latch must close once.

Callers

nothing calls this directly

Calls 2

acquireReclaimTestCtxFunction · 0.85
signalReleasedMethod · 0.65

Tested by

no test coverage detected