test: copy AR's Alloc before mutating
Fixes a race in client tests
This commit is contained in:
parent
17ed3f27ae
commit
add2dd8c2d
|
@ -30,7 +30,7 @@ func gcConfig() *GCConfig {
|
|||
// runners to be terminal
|
||||
func exitAllocRunner(runners ...AllocRunner) {
|
||||
for _, ar := range runners {
|
||||
terminalAlloc := ar.Alloc()
|
||||
terminalAlloc := ar.Alloc().Copy()
|
||||
terminalAlloc.DesiredStatus = structs.AllocDesiredStatusStop
|
||||
ar.Update(terminalAlloc)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue