From e9402da131f8fa5dc40a486788af64632fccfac5 Mon Sep 17 00:00:00 2001 From: Anton Evangelatov Date: Wed, 24 Jun 2020 14:33:31 +0200 Subject: [PATCH] fix ignored barrier (#58) --- lotus-soup/node.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lotus-soup/node.go b/lotus-soup/node.go index 375d25682..37c8eb70e 100644 --- a/lotus-soup/node.go +++ b/lotus-soup/node.go @@ -209,8 +209,8 @@ func prepareBootstrapper(t *TestEnvironment) (*Node, error) { } t.SyncClient.MustPublish(ctx, genesisTopic, genesisMsg) - // we are ready; wait for all nodes to be ready - t.SyncClient.MustBarrier(ctx, stateReady, t.TestInstanceCount) + t.RecordMessage("waiting for all nodes to be ready") + t.SyncClient.MustSignalAndWait(ctx, stateReady, t.TestInstanceCount) return n, nil } @@ -395,9 +395,8 @@ func prepareMiner(t *TestEnvironment) (*Node, error) { return nil, err } - // we are ready; wait for all nodes to be ready t.RecordMessage("waiting for all nodes to be ready") - t.SyncClient.MustBarrier(ctx, stateReady, t.TestInstanceCount) + t.SyncClient.MustSignalAndWait(ctx, stateReady, t.TestInstanceCount) return n, err } @@ -449,8 +448,7 @@ func prepareClient(t *TestEnvironment) (*Node, error) { } t.RecordMessage("waiting for all nodes to be ready") - // we are ready; wait for all nodes to be ready - t.SyncClient.MustBarrier(ctx, stateReady, t.TestInstanceCount) + t.SyncClient.MustSignalAndWait(ctx, stateReady, t.TestInstanceCount) return n, nil }