MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / TestClose

Method TestClose

asyncbuffer/cond_test.go:97–105  ·  view source on GitHub ↗

TestClose tests the behavior of the Cond when closed

()

Source from the content-addressed store, hash-verified

95
96// TestClose tests the behavior of the Cond when closed
97func (s *TestCondSuite) TestClose() {
98 cursor := s.cond.Cursor()
99 s.cond.Close()
100 s.cond.Close() // Should not panic
101 s.cond.Wait(cursor) // Should eventually return
102 s.cond.Tick() // Should not panic
103
104 s.Require().Nil(asyncbuffer.CondCh(s.cond))
105}
106
107func (s *TestCondSuite) TestRapidTicksAndWaits() {
108 const iterations = 1000

Callers

nothing calls this directly

Calls 5

CondChFunction · 0.92
CursorMethod · 0.80
TickMethod · 0.80
CloseMethod · 0.65
WaitMethod · 0.45

Tested by

no test coverage detected