Update flapping test

We need to wait for the route close to be processed before attempting
to recreate it.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This commit is contained in:
Ivan Kozlovic
2020-01-10 12:01:59 -07:00
parent 971d2350ed
commit bdd7fa86e9

View File

@@ -492,6 +492,9 @@ func TestRouteResendsLocalSubsOnReconnect(t *testing.T) {
// Close and then re-open
route.Close()
// Give some time for the route close to be processed before trying to recreate.
checkNumRoutes(t, s, 0)
route = createRouteConn(t, opts.Cluster.Host, opts.Cluster.Port)
defer route.Close()