internal/testplanet: ensure monitor chore is finished before contacting satellite (#3124)

This commit is contained in:
Cameron 2019-09-26 07:14:39 -06:00 committed by Egon Elbre
parent 9962f0c3f0
commit c874dae596

View File

@ -219,9 +219,17 @@ func (planet *Planet) Start(ctx context.Context) {
return peer.peer.Run(peer.ctx)
})
}
var group errgroup.Group
for _, peer := range planet.StorageNodes {
peer.Contact.Chore.Loop.TriggerWait()
peer := peer
group.Go(func() error {
peer.Storage2.Monitor.Loop.TriggerWait()
peer.Contact.Chore.Loop.TriggerWait()
return nil
})
}
_ = group.Wait()
planet.started = true
}