Browse Source

codec: test: discard messages from log package

Some libraries log messages using the log package.

These messages only serve to clutter the test output.

Send those messages to equivalent of /dev/null
Ugorji Nwoke 8 years ago
parent
commit
d00b2d1703
1 changed files with 3 additions and 0 deletions
  1. 3 0
      codec/shared_test.go

+ 3 - 0
codec/shared_test.go

@@ -45,6 +45,8 @@ import (
 	"flag"
 	"fmt"
 	"io"
+	"io/ioutil"
+	"log"
 	"sync"
 	"testing"
 )
@@ -133,6 +135,7 @@ var (
 )
 
 func init() {
+	log.SetOutput(ioutil.Discard) // don't allow things log to standard out/err
 	testHEDs = make([]testHED, 0, 32)
 	testHandles = append(testHandles,
 		// testNoopH,