From c874dae59690345aefaab9a7bcef7cfb1236a2b0 Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 26 Sep 2019 07:14:39 -0600 Subject: [PATCH] internal/testplanet: ensure monitor chore is finished before contacting satellite (#3124) --- internal/testplanet/planet.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/internal/testplanet/planet.go b/internal/testplanet/planet.go index 906702d11..370f47a51 100644 --- a/internal/testplanet/planet.go +++ b/internal/testplanet/planet.go @@ -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 }