From bdd7fa86e9239d0b39ed4aaeca45013c170db5e2 Mon Sep 17 00:00:00 2001 From: Ivan Kozlovic Date: Fri, 10 Jan 2020 12:01:59 -0700 Subject: [PATCH] Update flapping test We need to wait for the route close to be processed before attempting to recreate it. Signed-off-by: Ivan Kozlovic --- test/routes_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/routes_test.go b/test/routes_test.go index 0beeb489..a40cdb14 100644 --- a/test/routes_test.go +++ b/test/routes_test.go @@ -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()