fix(a3p-integration): replaceFeeDistributor flakiness fix #11006
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes: #10998
Description
In #10998, we see a flake introduced after
a3p-integration/p:upgrade-19
tests migrated toa3p-integration/n:upgrade-next
. The investigations showed thatfeeDistributor
was collecting more fees than our test is producing.Passing
Failing
My argument is, priorly we were introducing the new
feeDistributor
dedicated to testing during our test initiation phase. And after introduction of thefeeDistributor
, we were waiting for one fullcollectionInterval
to clear any leftover fees that haven't been collected by the oldfeeDistributor
. And only then we start producing new fees. I confirmed that this is not the current behavior after then:upgrade-next
migration as of the commit 271c55f#diff-7dd0ed44de879823d10b252f6483f52174e4fb9240966e7fcd1754298b41b0d7L161As of the migration to
upgrade-19
, we introduce the newfeeDistributor
inuprage.go
which causes fees produced by other tests to get in the way ofreplaceFeeDistributor.test.js
in a flakey way since thecollectionInterval
is 30 seconds.Solution
Just switch from
AmountMath.isEqual
toAmountMath.isGTE
when polling for results.Testing Considerations
Make sure integration tests pass in a consistent way.
Upgrade Considerations
Get rid of the flake so
upgrade-19
shipment isn't blocked.