(t *testing.T, sub *nats.Subscription, numExpected int)
| 6609 | } |
| 6610 | |
| 6611 | func checkSubsPending(t *testing.T, sub *nats.Subscription, numExpected int) { |
| 6612 | t.Helper() |
| 6613 | checkFor(t, 4*time.Second, 20*time.Millisecond, func() error { |
| 6614 | if nmsgs, _, err := sub.Pending(); err != nil || nmsgs != numExpected { |
| 6615 | return fmt.Errorf("Did not receive correct number of messages: %d vs %d", nmsgs, numExpected) |
| 6616 | } |
| 6617 | return nil |
| 6618 | }) |
| 6619 | } |
| 6620 | |
| 6621 | func TestJetStreamStreamMirror(t *testing.T) { |
| 6622 | withJSServer(t, testJetStreamMirror_Source) |
no test coverage detected