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

Use wait for ready on e2e test #1324

Merged
merged 2 commits into from
Mar 23, 2023
Merged

Conversation

ferranbt
Copy link
Contributor

Description

The majority of the e2e test must wait for the chain to start before any action can be performed. Currently, the tests use a utility function (WaitForBlock) to wait for a certain block to be created. However, it is inconsistent and up to the person writing the test to decide which block to wait for and how much time.

This PR introduces uses the WaitForReady function introduced in allow-list to standardize how much time to wait until we consider the cluster ready to perform any operation.

Note that I have not touched some tests from consensus_test.go that use long WaitForBlock numbers since the test involve having a long chain.

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Breaking changes

Please complete this section if any breaking changes have been made, otherwise delete it

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

Manual tests

Please complete this section if you ran manual tests for this functionality, otherwise delete it

Documentation update

Please link the documentation update PR in this section if it's present, otherwise delete it

Additional comments

Please post additional comments in this section if you have them, otherwise delete it

Copy link
Contributor

@igorcrevar igorcrevar left a comment

Choose a reason for hiding this comment

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

Approved. Just as a reminder (for me), in aa e2e test we will also have to call cluster.WaitForReady(t)

Copy link
Collaborator

@Stefan-Ethernal Stefan-Ethernal left a comment

Choose a reason for hiding this comment

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

LGTM.

Just curious, isn't it enough to wait just for a single block in the WaitForReady function?

@ferranbt
Copy link
Contributor Author

Just curious, isn't it enough to wait just for a single block in the WaitForReady function?

Yup, I did not want to change any behavior from other tests since some tests wait for more than one block. But yes, in my opinion, one block might be enough.

@ferranbt ferranbt requested a review from vcastellm March 22, 2023 15:14
@Stefan-Ethernal Stefan-Ethernal merged commit a6fffdc into develop Mar 23, 2023
@Stefan-Ethernal Stefan-Ethernal deleted the e2e-use-wait-for-ready branch March 23, 2023 16:43
@github-actions github-actions bot locked and limited conversation to collaborators Mar 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants