From 47bcf79c3a079c4cd849d328458649a6fd7ab170 Mon Sep 17 00:00:00 2001 From: Charles Iliya Krempeaux Date: Sat, 10 Oct 2015 09:18:03 -0700 Subject: [PATCH] improved test --- discard_router_test.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/discard_router_test.go b/discard_router_test.go index 9644a37..52f6857 100644 --- a/discard_router_test.go +++ b/discard_router_test.go @@ -3,13 +3,31 @@ package flog import ( "testing" + + "fmt" + "math/rand" + "time" ) func TestNewDiscardRouter(t *testing.T) { + randomness := rand.New(rand.NewSource( time.Now().UTC().UnixNano() )) + + router := NewDiscardRouter() if nil == router { t.Errorf("After trying to create a discard 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