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.
The aim of this PR is making functional test run faster
First commit:
Sleeping inside
wait_for_rpc_connection
is useless since in case of failure it will try again rather than throwing error.Second commit:
profiling showed that waiting for all nodes to connect to each other was very slow (
8
nodes took about ~32
seconds on my PC). If we connect them in parallel time is much faster ( more or less4
seconds on my PC)Third commit:
sleeping inside
is_node_stopped
is useless since it is always used in operations likewait_until_stopped
, and in case a node is not stopped it will wait and try again rather than throwing error.Fourth commit:
removed many other big
time.sleep()
that made everything go overall much slower. This is the only commit that I'm not 100% sure so if we see that some test fail at the beginning (I mean beforerun_test()
is called) this one can be reverted.Fifth commit:
Make faster and solve the failure of
p2p_invalid_messages.py
:When receiving lots of messages use a timeout system, instead of sleeping for an arbitrary amount of time (30 seconds, which sometimes was not enough)