From 32ff571f3e0e4172955d58e41d3f5d0b1da4294a Mon Sep 17 00:00:00 2001 From: Derek Collison Date: Tue, 30 Jul 2013 15:39:53 -0700 Subject: [PATCH] Flush SUB to route --- test/routes_test.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/routes_test.go b/test/routes_test.go index 6d271053..5bef7066 100644 --- a/test/routes_test.go +++ b/test/routes_test.go @@ -139,7 +139,7 @@ func TestRouteForwardsMsgFromClients(t *testing.T) { client := createClientConn(t, opts.Host, opts.Port) defer client.Close() - clientSend, _ := setupConn(t, client) + clientSend, clientExpect := setupConn(t, client) route := acceptRouteConn(t, opts.Routes[0].Host, server.DEFAULT_ROUTE_CONNECT) defer route.Close() @@ -152,9 +152,13 @@ func TestRouteForwardsMsgFromClients(t *testing.T) { // Send SUB via route connection routeSend("SUB foo RSID:2:22\r\n") + routeSend("PING\r\n") + routeExpect(pongRe) // Send PUB via client connection clientSend("PUB foo 2\r\nok\r\n") + clientSend("PING\r\n") + clientExpect(pongRe) matches := expectMsgs(1) checkMsg(t, matches[0], "foo", "RSID:2:22", "", "2", "ok") @@ -346,12 +350,10 @@ func TestMultipleRoutesSameId(t *testing.T) { route1 := createRouteConn(t, opts.ClusterHost, opts.ClusterPort) expectAuthRequired(t, route1) route1Send, _ := setupRouteEx(t, route1, opts, "ROUTE:2222") -// route1ExpectMsgs := expectMsgsCommand(t, route1Expect) route2 := createRouteConn(t, opts.ClusterHost, opts.ClusterPort) expectAuthRequired(t, route2) route2Send, _ := setupRouteEx(t, route2, opts, "ROUTE:2222") -// route2ExpectMsgs := expectMsgsCommand(t, route1Expect) // Send SUB via route connections sub := "SUB foo RSID:2:22\r\n"