-
Notifications
You must be signed in to change notification settings - Fork 714
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
testing: improve e2e test bootstrapping #3690
Conversation
tests/fixture/e2e/env.go
Outdated
allValidatorsBootstrapped := true | ||
for i := len(pendingBootstappingChains) - 1; i >= 0; i-- { | ||
pending := pendingBootstappingChains[i] | ||
uri, err := network.GetURIForNodeID(pending.validatorID) | ||
require.NoError(err) | ||
infoClient := info.NewClient(uri) | ||
isBootstrapped, err := infoClient.IsBootstrapped(tc.DefaultContext(), pending.chainID.String()) | ||
// Ignore errors since a chain id that is not yet known will result in a recoverable error. | ||
if err != nil || !isBootstrapped { | ||
allValidatorsBootstrapped = false | ||
continue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we perform an IsBootstrapped
check here rather than checking if the node is healthy? If the node reports healthy, all bootstrapping checks should pass and this will include correctly checking that dynamic state sync has completed (which is handled as a bit of an outlier).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
by the time we reach this point, the health check was already complete against all the nodes. Some differences:
- The health checking doesn't seem to be chain-specific, whereas the bootstrapping test is.
- When doing the health checking, the port would get dynamically refreshed. That's won't happen during the bootstrapping testing.
Why this should be merged
This PR remove the redundant testing for bootstrapping nodes after the nodes have already been verified to be healthy.
How this works
trivial.
How this was tested
Tested using existing tests.
Need to be documented in RELEASES.md?
no.