mirror of
https://github.com/coredns/coredns.git
synced 2025-11-02 02:03:13 -05:00
log instead of fmt
This commit is contained in:
@@ -3,6 +3,7 @@ package dnstapio
|
||||
import (
|
||||
"bytes"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"sync"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -10,6 +11,10 @@ import (
|
||||
tap "github.com/dnstap/golang-dnstap"
|
||||
)
|
||||
|
||||
func init() {
|
||||
log.SetOutput(ioutil.Discard)
|
||||
}
|
||||
|
||||
type buf struct {
|
||||
*bytes.Buffer
|
||||
cost time.Duration
|
||||
@@ -27,7 +32,6 @@ func (b buf) Close() error {
|
||||
func TestRace(t *testing.T) {
|
||||
b := buf{&bytes.Buffer{}, 100 * time.Millisecond}
|
||||
dio := New(b)
|
||||
dio.iolog = ioutil.Discard // don't flood Travis
|
||||
wg := &sync.WaitGroup{}
|
||||
wg.Add(10)
|
||||
for i := 0; i < 10; i++ {
|
||||
|
||||
Reference in New Issue
Block a user