hemilabs / heminetwork

The hemi network core daemons.
MIT License
72 stars 48 forks source link

make localnet tests more robust #293

Closed ClaytonNorthey92 closed 1 month ago

ClaytonNorthey92 commented 1 month ago

Summary make localnet tests more robust

prior, localnet would wait a certain period of time, then check if we reached certain values of different resoruces in our local chain (ex. HEMI balance, pop txs mined). this was problematic because there was no guarantee that we would reach those within the given amount of time for various reasons.

we could simply increase the time we wait, but then we would have to wait that amount of time per test.

Changes now, set a max timeout of 10 minutes for the test + 2 minute warm up. poll the network every 10 seconds for values reaching a reasonable threshold. if we reach this threshold within the timeout, success! otherwise failure.