Run tests in parallel (#478)
Create a small speedup running the tests: PASS ok github.com/miekg/coredns/test 10.329s PASS ok github.com/miekg/coredns/test 6.079s Skip the etcd ones. Doing the middleware/*/*_test ones doesn't yield any speedup as these are still done on a per directory basis.
This commit is contained in:
parent
0c3ad499d8
commit
94c59da577
14 changed files with 46 additions and 32 deletions
|
@ -3,6 +3,7 @@ package test
|
|||
import (
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"sync"
|
||||
|
||||
"github.com/miekg/coredns/core/dnsserver"
|
||||
|
||||
|
@ -12,8 +13,12 @@ import (
|
|||
"github.com/mholt/caddy"
|
||||
)
|
||||
|
||||
var mu sync.Mutex
|
||||
|
||||
// CoreDNSServer returns a CoreDNS test server. It just takes a normal Corefile as input.
|
||||
func CoreDNSServer(corefile string) (*caddy.Instance, error) {
|
||||
mu.Lock()
|
||||
defer mu.Unlock()
|
||||
caddy.Quiet = true
|
||||
dnsserver.Quiet = true
|
||||
log.SetOutput(ioutil.Discard)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue