MCPcopy
hub / github.com/nats-io/nats.go / checkSubsPending

Function checkSubsPending

test/js_test.go:6611–6619  ·  view source on GitHub ↗
(t *testing.T, sub *nats.Subscription, numExpected int)

Source from the content-addressed store, hash-verified

6609}
6610
6611func 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
6621func TestJetStreamStreamMirror(t *testing.T) {
6622 withJSServer(t, testJetStreamMirror_Source)

Calls 3

PendingMethod · 0.80
ErrorfMethod · 0.80
checkForFunction · 0.70

Tested by

no test coverage detected