Merge pull request #1774 from nats-io/qw_flapper

Fix flapper
This commit is contained in:
Derek Collison
2020-12-14 08:20:36 -08:00
committed by GitHub

View File

@@ -1679,9 +1679,12 @@ func TestJetStreamWorkQueueWrapWaiting(t *testing.T) {
}
expectWaiting(0)
if nmsgs, _, _ := sub.Pending(); err != nil || nmsgs != maxWaiting+2 {
t.Fatalf("Expected sub to have %d pending, got %d", maxWaiting+2, nmsgs)
}
checkFor(t, 200*time.Millisecond, 10*time.Millisecond, func() error {
if nmsgs, _, _ := sub.Pending(); err != nil || nmsgs != maxWaiting+2 {
return fmt.Errorf("Expected sub to have %d pending, got %d", maxWaiting+2, nmsgs)
}
return nil
})
})
}
}