From 5b95ce7f2658296be1bf3f5dae322db8b5dd94a6 Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Wed, 16 Jan 2019 18:54:04 +0000 Subject: [PATCH] Silence broker during tests --- broker/http_broker_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/broker/http_broker_test.go b/broker/http_broker_test.go index fad91311..a2aabdd5 100644 --- a/broker/http_broker_test.go +++ b/broker/http_broker_test.go @@ -5,7 +5,9 @@ import ( "testing" "time" + glog "github.com/go-log/log" "github.com/google/uuid" + "github.com/micro/go-log" "github.com/micro/go-micro/registry/memory" ) @@ -17,6 +19,9 @@ func newTestRegistry() *memory.Registry { } func sub(be *testing.B, c int) { + // set no op logger + log.SetLogger(glog.DefaultLogger) + be.StopTimer() m := newTestRegistry() @@ -77,6 +82,9 @@ func sub(be *testing.B, c int) { } func pub(be *testing.B, c int) { + // set no op logger + log.SetLogger(glog.DefaultLogger) + be.StopTimer() m := newTestRegistry() b := NewBroker(Registry(m))