Skip to content

Commit

Permalink
remove test logging cruft
Browse files Browse the repository at this point in the history
  • Loading branch information
mreiferson committed Feb 22, 2015
1 parent a3e0f55 commit 6cbc842
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 30 deletions.
5 changes: 0 additions & 5 deletions command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@ package nsq

import (
"bytes"
"io/ioutil"
"log"
"os"
"testing"
)

func BenchmarkCommand(b *testing.B) {
b.StopTimer()
log.SetOutput(ioutil.Discard)
defer log.SetOutput(os.Stdout)
data := make([]byte, 2048)
cmd := Publish("test", data)
var buf bytes.Buffer
Expand Down
4 changes: 0 additions & 4 deletions mock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"io/ioutil"
"log"
"net"
"os"
"strconv"
"testing"
"time"
Expand Down Expand Up @@ -182,9 +181,6 @@ func (h *testHandler) HandleMessage(message *Message) error {
}

func TestConsumerBackoff(t *testing.T) {
log.SetOutput(ioutil.Discard)
defer log.SetOutput(os.Stdout)

logger := log.New(ioutil.Discard, "", log.LstdFlags)

var mgood bytes.Buffer
Expand Down
21 changes: 0 additions & 21 deletions producer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ package nsq

import (
"errors"
"io/ioutil"
"log"
"os"
"strconv"
"testing"
"time"
Expand Down Expand Up @@ -35,9 +32,6 @@ func (h *ConsumerHandler) HandleMessage(message *Message) error {
}

func TestProducerConnection(t *testing.T) {
log.SetOutput(ioutil.Discard)
defer log.SetOutput(os.Stdout)

config := NewConfig()
w, _ := NewProducer("127.0.0.1:4150", config)
w.SetLogger(nullLogger, LogLevelInfo)
Expand All @@ -56,9 +50,6 @@ func TestProducerConnection(t *testing.T) {
}

func TestProducerPublish(t *testing.T) {
log.SetOutput(ioutil.Discard)
defer log.SetOutput(os.Stdout)

topicName := "publish" + strconv.Itoa(int(time.Now().Unix()))
msgCount := 10

Expand All @@ -83,9 +74,6 @@ func TestProducerPublish(t *testing.T) {
}

func TestProducerMultiPublish(t *testing.T) {
log.SetOutput(ioutil.Discard)
defer log.SetOutput(os.Stdout)

topicName := "multi_publish" + strconv.Itoa(int(time.Now().Unix()))
msgCount := 10

Expand Down Expand Up @@ -113,9 +101,6 @@ func TestProducerMultiPublish(t *testing.T) {
}

func TestProducerPublishAsync(t *testing.T) {
log.SetOutput(ioutil.Discard)
defer log.SetOutput(os.Stdout)

topicName := "async_publish" + strconv.Itoa(int(time.Now().Unix()))
msgCount := 10

Expand Down Expand Up @@ -151,9 +136,6 @@ func TestProducerPublishAsync(t *testing.T) {
}

func TestProducerMultiPublishAsync(t *testing.T) {
log.SetOutput(ioutil.Discard)
defer log.SetOutput(os.Stdout)

topicName := "multi_publish" + strconv.Itoa(int(time.Now().Unix()))
msgCount := 10

Expand Down Expand Up @@ -193,9 +175,6 @@ func TestProducerMultiPublishAsync(t *testing.T) {
}

func TestProducerHeartbeat(t *testing.T) {
log.SetOutput(ioutil.Discard)
defer log.SetOutput(os.Stdout)

topicName := "heartbeat" + strconv.Itoa(int(time.Now().Unix()))

config := NewConfig()
Expand Down

0 comments on commit 6cbc842

Please sign in to comment.