fix ignored barrier (#58)

This commit is contained in:
Anton Evangelatov 2020-06-24 14:33:31 +02:00 committed by GitHub
parent 04a945531c
commit e9402da131
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}