processSuccessfully allows a request to pass the barrier, waits for it to be finished and asserts it to succeed.
(t *testing.T)
| 389 | // processSuccessfully allows a request to pass the barrier, waits for it to |
| 390 | // be finished and asserts it to succeed. |
| 391 | func (r *requestor) processSuccessfully(t *testing.T) { |
| 392 | t.Helper() |
| 393 | r.barrierCh <- struct{}{} |
| 394 | if !<-r.acceptedCh { |
| 395 | t.Error("expected request to succeed but it failed") |
| 396 | } |
| 397 | } |
| 398 | |
| 399 | func BenchmarkBreakerMaybe(b *testing.B) { |
| 400 | op := func() {} |
no test coverage detected