verifyCompletingEvent verifies that one single event arrive on an completing channel.
(t *testing.T, completing chan []common.Hash, arrive bool)
| 206 | |
| 207 | // verifyCompletingEvent verifies that one single event arrive on an completing channel. |
| 208 | func verifyCompletingEvent(t *testing.T, completing chan []common.Hash, arrive bool) { |
| 209 | if arrive { |
| 210 | select { |
| 211 | case <-completing: |
| 212 | case <-time.After(time.Second): |
| 213 | t.Fatalf("completing timeout") |
| 214 | } |
| 215 | } else { |
| 216 | select { |
| 217 | case <-completing: |
| 218 | t.Fatalf("completing invoked") |
| 219 | case <-time.After(10 * time.Millisecond): |
| 220 | } |
| 221 | } |
| 222 | } |
| 223 | |
| 224 | // verifyImportEvent verifies that one single event arrive on an import channel. |
| 225 | func verifyImportEvent(t *testing.T, imported chan *types.Block, arrive bool) { |
no outgoing calls
no test coverage detected