Skip to content

Commit

Permalink
Fix rng data race
Browse files Browse the repository at this point in the history
  • Loading branch information
prashantv committed Apr 19, 2016
1 parent 97828ac commit 0c470fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion relay_stub_test.go
Expand Up @@ -5,6 +5,8 @@ import (
"sync"
"testing"

. "github.com/uber/tchannel-go"

"github.com/stretchr/testify/assert"
)

Expand All @@ -17,7 +19,7 @@ type SimpleRelayHosts struct {
func NewSimpleRelayHosts(peers map[string][]string) *SimpleRelayHosts {
// Use a known seed for repeatable tests.
return &SimpleRelayHosts{
r: rand.New(rand.NewSource(1)),
r: NewRand(1),
peers: peers,
}
}
Expand Down

0 comments on commit 0c470fc

Please sign in to comment.