mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-16 19:14:41 -07:00
@@ -1414,15 +1414,18 @@ func TestLeafNodeHubWithGateways(t *testing.T) {
|
||||
ncD := natsConnect(t, d.ClientURL())
|
||||
defer ncD.Close()
|
||||
|
||||
subsOnABefore := a.globalAccount().TotalSubs()
|
||||
|
||||
ncD.Subscribe("service", func(m *nats.Msg) {
|
||||
m.Respond([]byte("reply"))
|
||||
})
|
||||
ncD.Flush()
|
||||
|
||||
// Wait for interest to be registered on A.
|
||||
checkExpectedSubs(t, subsOnABefore+1, a)
|
||||
checkFor(t, time.Second, 15*time.Millisecond, func() error {
|
||||
acc := a.globalAccount()
|
||||
if r := acc.sl.Match("service"); r != nil && len(r.psubs) == 1 {
|
||||
return nil
|
||||
}
|
||||
return fmt.Errorf("subscription still not registered")
|
||||
})
|
||||
|
||||
// Create requestor on A and send the request, expect a reply.
|
||||
ncA := natsConnect(t, a.ClientURL())
|
||||
|
||||
Reference in New Issue
Block a user