hyperledger / besu

An enterprise-grade Java-based, Apache 2.0 licensed Ethereum client https://wiki.hyperledger.org/display/besu
https://www.hyperledger.org/projects/besu
Apache License 2.0
1.52k stars 840 forks source link

Fix AT Cluster Restart Behaviour #6954

Open siladu opened 7 months ago

siladu commented 7 months ago

https://github.com/hyperledger/besu/commit/7e46889817b718d21b385c0568b19163ca9c1372 was found to slow down the ATs by 3-4x.

It was reverted in https://github.com/hyperledger/besu/pull/6948

We should revisit this considering @fab-10 comments from #6948 ...

The commit that I did, is actually fixing the intent of the test, that was to stop the cluster after each single unit tests, and start with a new one every time, that intended behavior was broken, and had the side effect of keeping previously started Besu processes around for the duration of the test class, and so had the nice side effect that for all the test methods after the first a cluster was already up to respond to requests. So instead of reverting to the wrong but faster state, I will prefer that we understand if the initial intends of restarting the cluster after each test methods was really needed and instead replace it with a restart each test class. It is also worth to note that ATs in CI could be re-organized to balance the time.

after a quick analysis, I found there are some steps needed to first port all the tests to Junit5, then identify test classes that do not need to have a cluster restart for every method and probably also a refactor of the base classes, so for the moment we can revert to the previous buggy but faster code, while implementing these pre tasks.

Tasks

github-actions[bot] commented 1 week ago

This issue is stale because it has been open for 6 months with no activity.