(t *testing.T)
| 1627 | } |
| 1628 | |
| 1629 | func 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 | |
| 1643 | func Test_Observable_Retry_Error_ShouldNotRetry(t *testing.T) { |
| 1644 | defer goleak.VerifyNone(t) |
nothing calls this directly
no test coverage detected
searching dependent graphs…