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 gas price and gas adjustments. #836

Merged
merged 1 commit into from
May 15, 2024

Conversation

dzmitryhil
Copy link
Contributor

@dzmitryhil dzmitryhil commented May 14, 2024

Description

Reviewers checklist:

  • Try to write more meaningful comments with clear actions to be taken.
  • Nit-picking should be unblocking. Focus on core issues.

Authors checklist

  • Provide a concise and meaningful description
  • Review the code yourself first, before making the PR.
  • Annotate your PR in places that require explanation.
  • Think and try to split the PR to smaller PR if it is big.

This change is Reviewable

Copy link

codecov bot commented May 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 37.06%. Comparing base (cb42e0e) to head (9523ec2).

Additional details and impacted files
@@             Coverage Diff             @@
##           master     #836       +/-   ##
===========================================
+ Coverage   23.76%   37.06%   +13.29%     
===========================================
  Files         176      182        +6     
  Lines       52278    52713      +435     
===========================================
+ Hits        12425    19536     +7111     
+ Misses      37433    29639     -7794     
- Partials     2420     3538     +1118     
Flag Coverage Δ
coreum 32.95% <ø> (?)
coreum-integration-tests-modules 23.79% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dzmitryhil dzmitryhil marked this pull request as ready for review May 14, 2024 11:53
@dzmitryhil dzmitryhil requested a review from a team as a code owner May 14, 2024 11:53
@dzmitryhil dzmitryhil requested review from masihyeganeh, miladz68, ysv and wojtek-coreum and removed request for a team May 14, 2024 11:53
Copy link
Contributor

@ysv ysv left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dzmitryhil, @masihyeganeh, @miladz68, and @wojtek-coreum)


testutil/integration/gov.go line 226 at r1 (raw file):

		msg := msgFunc(staker)

		txf := g.chainCtx.TxFactory().WithSimulateAndExecute(true).WithGasAdjustment(voteGasAdjustment)

nit: could you remind why we need this adjustment only inside gov ?

Copy link
Contributor

@masihyeganeh masihyeganeh left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dzmitryhil, @miladz68, and @wojtek-coreum)

Copy link
Contributor Author

@dzmitryhil dzmitryhil left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @miladz68, @wojtek-coreum, and @ysv)


testutil/integration/gov.go line 226 at r1 (raw file):

Previously, ysv (Yaroslav Savchuk) wrote…

nit: could you remind why we need this adjustment only inside gov ?

Because the Coreum gas adjustment is 1, so when we use WithSimulateAndExecute(true) there is a high chance that at the time of the execution gas will be different.

@dzmitryhil dzmitryhil requested a review from ysv May 15, 2024 05:27
Copy link
Contributor Author

@dzmitryhil dzmitryhil left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @miladz68 and @wojtek-coreum)

@dzmitryhil dzmitryhil merged commit 871f012 into master May 15, 2024
9 checks passed
@dzmitryhil dzmitryhil deleted the dzmitryhil/fix-tests-gas-issues branch May 15, 2024 05:28
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