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

Improve integration tests #156

Merged
merged 3 commits into from
Oct 4, 2022
Merged

Improve integration tests #156

merged 3 commits into from
Oct 4, 2022

Conversation

KonradStaniec
Copy link
Contributor

Improve integration test:

  • Introduce additional sender account for each validator in testnet. This is way around Improve sending of bls transaction by checkpointing module. #155, so now each send transactions does not race with bls transaction.
    Another way would be to add some retries, but that would make tests more non-detetministic.
  • Having that enables reducing epoch interval.

Having those improvements halfs the current tests runtime.

t.Errorf("Epoch after 10 blocks, should equal 2. Curent epoch %d", currentEpochResponse.CurrentEpoch)
currentEpoch := getCurrentEpoch(c)
if currentEpoch != 2 {
t.Errorf("Epoch after 7 blocks, should equal 2. Curent epoch %d", currentEpoch)
Copy link
Contributor

@aakoshh aakoshh Oct 4, 2022

Choose a reason for hiding this comment

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

Suggested change
t.Errorf("Epoch after 7 blocks, should equal 2. Curent epoch %d", currentEpoch)
t.Errorf("Epoch after 7 blocks, should equal 2. Current epoch %d", currentEpoch)

Maybe you can also mention that this is because of the Makefile passing a flag?

test/utils.go Outdated

acc, err := b.getAccount()
if err != nil {
panic("creating new header message must success ")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
panic("creating new header message must success ")
panic("creating new header message must succeed")

Copy link
Contributor

@aakoshh aakoshh left a comment

Choose a reason for hiding this comment

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

I didn't try to understand all the changes but happy to hear you managed to half the runtime, and the code looks simpler as well 👍

@KonradStaniec KonradStaniec merged commit 4c87a3d into main Oct 4, 2022
@KonradStaniec KonradStaniec deleted the improve-integration-tests branch October 4, 2022 16:34
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.

2 participants