MCPcopy
hub / github.com/cortexlabs/cortex / processSuccessfully

Method processSuccessfully

pkg/proxy/breaker_test.go:391–397  ·  view source on GitHub ↗

processSuccessfully allows a request to pass the barrier, waits for it to be finished and asserts it to succeed.

(t *testing.T)

Source from the content-addressed store, hash-verified

389// processSuccessfully allows a request to pass the barrier, waits for it to
390// be finished and asserts it to succeed.
391func (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
399func BenchmarkBreakerMaybe(b *testing.B) {
400 op := func() {}

Callers 5

TestBreakerOverloadMixedFunction · 0.80
TestBreakerOverloadFunction · 0.80
TestBreakerQueueingFunction · 0.80
TestBreakerNoOverloadFunction · 0.80
TestBreakerCancelFunction · 0.80

Calls 1

ErrorMethod · 0.80

Tested by

no test coverage detected