This repository has been archived by the owner on Aug 2, 2021. It is now read-only.
cmd/swarm: simplify testCluster.StartNewNodes #1777
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Method StartNewNodes starts test nodes in parallel and handles errors. However, in tests only 1, 2 or 3 nodes are started making this complexity hard to justify. This code would not be changed if it was not observed that it deadlocks on travis very rarely https://travis-ci.org/ethersphere/swarm/jobs/586074055#L2095 on waiting on the error channel. I was not able to reproduce the problem of find the root cause, so I simplified the code by making it synchronous as it does not prolong test execution time significantly.