mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Allow all members of a replicated stream to participate in direct access.
We will wait until a non-leader replica is current to subscribe. Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
@@ -2536,7 +2536,16 @@ func TestJetStreamSuperClusterStreamDirectGetMirrorQueueGroup(t *testing.T) {
|
||||
}
|
||||
addStream(t, nc, cfg)
|
||||
|
||||
// Since last one was an R3, check and wait for subscription.
|
||||
checkFor(t, 5*time.Second, 100*time.Millisecond, func() error {
|
||||
si, err := js.StreamInfo("M2")
|
||||
require_NoError(t, err)
|
||||
if si.State.Msgs != uint64(num) {
|
||||
return fmt.Errorf("Expected %d msgs, got state: %d", num, si.State.Msgs)
|
||||
}
|
||||
return nil
|
||||
})
|
||||
|
||||
// Since last one was an R3, check and wait for the direct subscription.
|
||||
checkFor(t, 2*time.Second, 100*time.Millisecond, func() error {
|
||||
sl := sc.clusterForName("C3").streamLeader("$G", "M2")
|
||||
if mset, err := sl.GlobalAccount().lookupStream("M2"); err == nil {
|
||||
|
||||
Reference in New Issue
Block a user