Add GoSafe goroutine launch
Signed-off-by: Emile Vauge <emile@vauge.com>
This commit is contained in:
parent
af41c79798
commit
bcc5f24c0f
10 changed files with 68 additions and 22 deletions
|
@ -7,6 +7,7 @@ import (
|
|||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/containous/traefik/safe"
|
||||
"github.com/docker/libkv/store"
|
||||
"reflect"
|
||||
"sort"
|
||||
|
@ -256,7 +257,9 @@ func TestKvWatchTree(t *testing.T) {
|
|||
}
|
||||
|
||||
configChan := make(chan types.ConfigMessage)
|
||||
go provider.watchKv(configChan, "prefix")
|
||||
safe.Go(func() {
|
||||
provider.watchKv(configChan, "prefix")
|
||||
})
|
||||
|
||||
select {
|
||||
case c1 := <-returnedChans:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue