(t *testing.T)
| 125 | } |
| 126 | |
| 127 | func TestHandlerNotifier_EnqueueConnectionState_AfterClose(t *testing.T) { |
| 128 | defer test.CheckRoutines(t)() |
| 129 | |
| 130 | connCh := make(chan struct{}, 1) |
| 131 | notifier := &handlerNotifier{ |
| 132 | connectionStateFunc: func(ConnectionState) { connCh <- struct{}{} }, |
| 133 | done: make(chan struct{}), |
| 134 | } |
| 135 | |
| 136 | notifier.Close(false) |
| 137 | notifier.EnqueueConnectionState(ConnectionStateConnected) |
| 138 | |
| 139 | assert.Never(t, func() bool { |
| 140 | select { |
| 141 | case <-connCh: |
| 142 | return true |
| 143 | default: |
| 144 | return false |
| 145 | } |
| 146 | }, 250*time.Millisecond, 10*time.Millisecond, "connectionStateFunc should not be called after close") |
| 147 | } |
| 148 | |
| 149 | func TestHandlerNotifier_EnqueueCandidate_AfterClose(t *testing.T) { |
| 150 | defer test.CheckRoutines(t)() |
nothing calls this directly
no test coverage detected
searching dependent graphs…