-
Notifications
You must be signed in to change notification settings - Fork 245
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
Sync blockchain before running e2e tests on public testnet #568
Comments
I noticed that new blocks are created during tests, so it makes sense to sync the chain before every test suite or even test (like we do currently). Another problem - it won't be enough to run |
Correct but if the blockchain is synced in 95%, it will take a few seconds to sync the missing blocks during the test.
Yes and no but basically you need to know what you're doing. Preferably, developer should always run it on a private blockchain and if they want to run it on the public testnet, there must be a reason. Also, again, it's enough to sync it once and you will be good for a few hours as syncing the missing blocks will take a few seconds. |
Related #571 |
There are 2 options how it can be implemented.
Following subscription can be used to track the progress of syncing: https://github.com/ethereum/go-ethereum/blob/master/eth/downloader/api.go#L93-L120 . But because we wrapped rpc client it will be required to add ethsubscribe method to it https://github.com/ethereum/go-ethereum/blob/master/rpc/client.go#L352-L355 . And the link to documentation what objects syncing subscription will return https://github.com/ethereum/go-ethereum/wiki/RPC-PUB-SUB#syncing
|
Balance: 0.000000 ETH |
Getting a PR ready for this. |
Problem
If e2e tests start on a public testnet and the blockchain is not synced, the tests fail due to timeout.
Implementation
Have a prerequisite that checks if the blockchain is synced. If it's not, sync it before running e2e tests.
Instead of:
Do something like:
This needs to be fixed in
.travis.yml
.Acceptance Criteria
The text was updated successfully, but these errors were encountered: