osmosis icon indicating copy to clipboard operation
osmosis copied to clipboard

Add table-driven distribute test

Open catShaark opened this issue 2 years ago • 8 comments

Closes: #1995

What is the purpose of the change

Change TestGetModuleToDistributeCoins and TestGetModuleDistributedCoins into table driven tests

SetupNewGauge and SetupNewGaugeWithDenom now takes in an additional param numEpochsPaidOver

Documentation and Release Note

  • Does this pull request introduce a new feature or user-facing behavior changes? no
  • Is a relevant changelog entry added to the Unreleased section in CHANGELOG.md? no
  • How is the feature or change documented? not documented

catShaark avatar Jul 13 '22 03:07 catShaark

Is there a reason we removed the Require statements?

to reduce verbosity, said p0mvn

catShaark avatar Jul 17 '22 12:07 catShaark

Is there a reason we removed the Require statements?

to reduce verbosity, said p0mvn

I'm not following? How does Require() add verbosity? We want to be consistent in our test usage and have tests exit early as possible upon failures IMO.

alexanderbez avatar Jul 18 '22 02:07 alexanderbez

Is there a reason we removed the Require statements?

to reduce verbosity, said p0mvn

I'm not following? How does Require() add verbosity? We want to be consistent in our test usage and have tests exit early as possible upon failures IMO.

I assumed that suite.Error() and suite.Require().Error() are equivalent. That was the motivation for the suggestion. However, after seeing @alexanderbez 's comment, I checked that the suite.Require().Error() does indeed fail immediately contrary to the alternative.

Knowing this, I think my earlier suggestion isn't what we want. Apologies for the confusion @catShaark and thanks @alexanderbez

p0mvn avatar Jul 18 '22 02:07 p0mvn

Let's merge this upon reverting excluding the Require() :) !

mattverse avatar Jul 18 '22 11:07 mattverse

Let's merge this upon reverting excluding the Require() :) !

@mattverse, changes reverted

catShaark avatar Jul 18 '22 13:07 catShaark

So I want to use BeginNewBlock to execute epoch instead of distribute manually, but right now BeginNewBlock with execute epoch doesn't work as expected ( it won't trigger gauge distribution in incentives test). I explain the problem in this issue here, @p0mvn can you take a look https://github.com/osmosis-labs/osmosis/issues/2241

catShaark avatar Jul 29 '22 11:07 catShaark

@p0mvn , I have some questions needed answer before I can actually finish this issue.

catShaark avatar Aug 06 '22 21:08 catShaark

@catShaark answered! I think ur understanding there is correct!

mattverse avatar Aug 09 '22 10:08 mattverse

Hey @catShaark! What specific questions / unknowns are present for this PR? I want to ensure there are no blockers on our side for this.

czarcas7ic avatar Aug 23 '22 14:08 czarcas7ic

@czarcas7ic , I have some questions needed answer before I can actually finish this issue.

catShaark avatar Aug 23 '22 21:08 catShaark

This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you!

github-actions[bot] avatar Sep 07 '22 00:09 github-actions[bot]