etcdserver: print out log of normal tests

This commit is contained in:
Yicheng Qin 2014-12-29 14:38:00 -08:00
parent 6ccaadc95d
commit 3748088b96

View File

@ -23,6 +23,7 @@ import (
"log"
"math/rand"
"net/http"
"os"
"path"
"reflect"
"strconv"
@ -41,10 +42,6 @@ import (
"github.com/coreos/etcd/store"
)
func init() {
log.SetOutput(ioutil.Discard)
}
// TestDoLocalAction tests requests which do not need to go through raft to be applied,
// and are served through local data.
func TestDoLocalAction(t *testing.T) {
@ -530,6 +527,9 @@ func (s *fakeTransporter) Pause() {}
func (s *fakeTransporter) Resume() {}
func testServer(t *testing.T, ns uint64) {
log.SetOutput(ioutil.Discard)
defer log.SetOutput(os.Stderr)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
@ -1227,6 +1227,8 @@ func TestPublishStopped(t *testing.T) {
// TestPublishRetry tests that publish will keep retry until success.
func TestPublishRetry(t *testing.T) {
log.SetOutput(ioutil.Discard)
defer log.SetOutput(os.Stderr)
n := &nodeRecorder{}
srv := &EtcdServer{
node: n,