Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make localnet tests more robust #293

Merged
merged 1 commit into from
Oct 25, 2024

Conversation

ClaytonNorthey92
Copy link
Contributor

@ClaytonNorthey92 ClaytonNorthey92 commented Oct 24, 2024

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.

@ClaytonNorthey92 ClaytonNorthey92 requested a review from a team as a code owner October 24, 2024 01:33
@ClaytonNorthey92 ClaytonNorthey92 marked this pull request as draft October 24, 2024 12:18
@ClaytonNorthey92 ClaytonNorthey92 force-pushed the clayton/robust-localnet-tests branch from 91fa0a1 to 387a630 Compare October 25, 2024 13:56
@ClaytonNorthey92 ClaytonNorthey92 changed the title increase initial number of blocks to 3000 in localnet make localnet tests more robust Oct 25, 2024
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.

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.
@ClaytonNorthey92 ClaytonNorthey92 force-pushed the clayton/robust-localnet-tests branch from 387a630 to 03267a9 Compare October 25, 2024 14:04
@@ -15,6 +15,7 @@ services:
- "-rpcallowip=0.0.0.0/0"
- "-rpcbind=0.0.0.0:18443"
- "-txindex=1"
- "-rpcworkqueue=400"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is likely not needed, but it doesn't hurt; I was seeing a few warnings of it being too small to handle requests so I bumped it up

@ClaytonNorthey92 ClaytonNorthey92 marked this pull request as ready for review October 25, 2024 14:28
Copy link
Contributor

@jcvernaleo jcvernaleo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@ClaytonNorthey92 ClaytonNorthey92 merged commit 2989b9b into main Oct 25, 2024
7 checks passed
@ClaytonNorthey92 ClaytonNorthey92 deleted the clayton/robust-localnet-tests branch October 25, 2024 14:55
web3cryptoguy pushed a commit to web3cryptoguy/heminetwork that referenced this pull request Nov 1, 2024
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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants