mirror of
https://github.com/coredns/coredns.git
synced 2025-12-12 05:15:12 -05:00
plugin/dnstap: don't spam Travis + valid dnstap payload (#1121)
* don't spam Travis + valid dnstap payload
* log instead of fmt
* Revert "log instead of fmt"
This reverts commit 88f09c3939.
* log the right way
* log the final way
* minor enhancements
This commit is contained in:
@@ -2,6 +2,8 @@ package dnstapio
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"sync"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -9,6 +11,10 @@ import (
|
||||
tap "github.com/dnstap/golang-dnstap"
|
||||
)
|
||||
|
||||
func init() {
|
||||
log.SetOutput(ioutil.Discard)
|
||||
}
|
||||
|
||||
type buf struct {
|
||||
*bytes.Buffer
|
||||
cost time.Duration
|
||||
@@ -38,7 +44,8 @@ func TestRace(t *testing.T) {
|
||||
return
|
||||
default:
|
||||
time.Sleep(50 * time.Millisecond)
|
||||
dio.Dnstap(tap.Dnstap{})
|
||||
t := tap.Dnstap_MESSAGE
|
||||
dio.Dnstap(tap.Dnstap{Type: &t})
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
Reference in New Issue
Block a user