MCPcopy Create free account
hub / github.com/ReactiveX/RxGo / Test_Observable_Retry_Error_ShouldRetry

Function Test_Observable_Retry_Error_ShouldRetry

observable_operator_test.go:1629–1641  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1627}
1628
1629func Test_Observable_Retry_Error_ShouldRetry(t *testing.T) {
1630 defer goleak.VerifyNone(t)
1631 ctx, cancel := context.WithCancel(context.Background())
1632 defer cancel()
1633 obs := Defer([]Producer{func(ctx context.Context, next chan<- Item) {
1634 next <- Of(1)
1635 next <- Of(2)
1636 next <- Error(errFoo)
1637 }}).Retry(3, func(err error) bool {
1638 return true
1639 })
1640 Assert(ctx, t, obs, HasItems(1, 2, 1, 2, 1, 2, 1, 2), HasError(errFoo))
1641}
1642
1643func Test_Observable_Retry_Error_ShouldNotRetry(t *testing.T) {
1644 defer goleak.VerifyNone(t)

Callers

nothing calls this directly

Calls 7

DeferFunction · 0.85
OfFunction · 0.85
ErrorFunction · 0.85
AssertFunction · 0.85
HasItemsFunction · 0.85
HasErrorFunction · 0.85
RetryMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…