From 31952e7ae1f4751a1eaafc6b48aa1e788b06360c Mon Sep 17 00:00:00 2001 From: Charles Iliya Krempeaux Date: Sat, 10 Oct 2015 14:01:12 -0700 Subject: [PATCH] improved test --- filtered_router_test.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/filtered_router_test.go b/filtered_router_test.go index cd670ed..5112442 100644 --- a/filtered_router_test.go +++ b/filtered_router_test.go @@ -12,6 +12,9 @@ import ( func TestFilteredRouterJustCreated(t *testing.T) { + randomness := rand.New(rand.NewSource( time.Now().UTC().UnixNano() )) + + router := NewFilteredRouter(NewDiscardRouter(), func(string, map[string]interface{}) bool { return false }) @@ -19,6 +22,16 @@ func TestFilteredRouterJustCreated(t *testing.T) { t.Errorf("After trying to create a filtered router, expected it to be not nil, but was: %v", router) } + + message := fmt.Sprint("%x", randomness.Int63n(9999999999)) + + context := make(map[string]interface{}) + limit := randomness.Int63n(30) + for i:=int64(0); i