Don't assign to an atomic w/o using atomic setter func

This commit is contained in:
Sean Chittenden 2016-06-16 14:30:59 -07:00
parent 8986b65fd7
commit 31313b68cf
No known key found for this signature in database
GPG Key ID: 4EBC9DC16C2E5E16
1 changed files with 2 additions and 2 deletions

View File

@ -39,8 +39,8 @@ func testServer(t *testing.T, cb func(*Config)) *Server {
IP: []byte{127, 0, 0, 1},
Port: getPort(),
}
nodeNumber = atomic.AddUint32(&nodeNumber, 1)
config.NodeName = fmt.Sprintf("nomad-%03d", nodeNumber)
nodeNum := atomic.AddUint32(&nodeNumber, 1)
config.NodeName = fmt.Sprintf("nomad-%03d", nodeNum)
// Tighten the Serf timing
config.SerfConfig.MemberlistConfig.BindAddr = "127.0.0.1"