TestClose tests the behavior of the Cond when closed
()
| 95 | |
| 96 | // TestClose tests the behavior of the Cond when closed |
| 97 | func (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 | |
| 107 | func (s *TestCondSuite) TestRapidTicksAndWaits() { |
| 108 | const iterations = 1000 |