Fixed a bug where we leaked service imports. Also prior this would have leaked subscriptions as well.

Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
Derek Collison
2019-11-14 13:14:56 -08:00
parent b8b4087613
commit 3330820502
7 changed files with 89 additions and 7 deletions

View File

@@ -547,6 +547,14 @@ func shutdownCluster(c *cluster) {
}
}
func (c *cluster) totalSubs() int {
totalSubs := 0
for _, s := range c.servers {
totalSubs += int(s.NumSubscriptions())
}
return totalSubs
}
// Wait for the expected number of outbound gateways, or fails.
func waitForOutboundGateways(t *testing.T, s *server.Server, expected int, timeout time.Duration) {
t.Helper()