From 504726f47d419c828893bc2458005a8da589f259 Mon Sep 17 00:00:00 2001 From: Derek Collison Date: Tue, 13 Nov 2012 19:26:19 -0800 Subject: [PATCH] Need subs cache --- server/split_test.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/server/split_test.go b/server/split_test.go index 9b055554..9323e10b 100644 --- a/server/split_test.go +++ b/server/split_test.go @@ -5,12 +5,14 @@ package server import ( "bytes" "testing" + + "github.com/apcera/gnatsd/hashmap" "github.com/apcera/gnatsd/sublist" ) func TestSplitBufferSubOp(t *testing.T) { s := &Server{ sl: sublist.New() } - c := &client{srv:s} + c := &client{srv:s, subs: hashmap.New()} subop := []byte("SUB foo 1\r\n") subop1 := subop[:6] @@ -45,7 +47,7 @@ func TestSplitBufferSubOp(t *testing.T) { } func TestSplitBufferPubOp(t *testing.T) { - c := &client{} + c := &client{subs: hashmap.New()} pub := []byte("PUB foo.bar INBOX.22 11\r\nhello world\r") pub1 := pub[:2] pub2 := pub[2:9] @@ -111,7 +113,7 @@ func TestSplitBufferPubOp(t *testing.T) { } func TestSplitBufferPubOp2(t *testing.T) { - c := &client{} + c := &client{subs: hashmap.New()} pub := []byte("PUB foo.bar INBOX.22 11\r\nhello world\r\n") pub1 := pub[:30] pub2 := pub[30:]