You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While debugging #11926 (from #9010) I realized that the entire file (might) contain tests that don't test what they say. I'll explain below and wait for comments to see if this requires fixing.
TL;DR These tests are querying for deposits supposedly after waiting for the voting period to pass. This should not be possible (deposits are not queryable after this period) and these tests require some fixing.
TestQueryDepositsWithoutInitialDeposit is supposedly waiting for the voting period to end but then goes and queries the deposits. This means that both the "wait for voting period to end" and the subsequent query are wrong. This can be proven by adding a bigger delay between the deposit and the query: we get an error saying that the deposit doesn't exist.
TestRejectedProposalDeposits is the test that was flagged as flaky in #9010. The name implies that it queries the deposits from an already rejected proposal; if that's true then we should get exactly 0 deposits. But the test code does the opposite and expects to get the deposits list.
This one (TestQueryProposalNotEnoughDeposits) is actually getting it right:
Summary
While debugging #11926 (from #9010) I realized that the entire file (might) contain tests that don't test what they say. I'll explain below and wait for comments to see if this requires fixing.
TestQueryDepositsWithoutInitialDeposit
is supposedly waiting for the voting period to end but then goes and queries the deposits. This means that both the "wait for voting period to end" and the subsequent query are wrong. This can be proven by adding a bigger delay between the deposit and the query: we get an error saying that the deposit doesn't exist.cosmos-sdk/x/gov/client/testutil/deposits.go
Lines 96 to 113 in 1715693
TestRejectedProposalDeposits
is the test that was flagged as flaky in #9010. The name implies that it queries the deposits from an already rejected proposal; if that's true then we should get exactly 0 deposits. But the test code does the opposite and expects to get the deposits list.This one (
TestQueryProposalNotEnoughDeposits
) is actually getting it right:cosmos-sdk/x/gov/client/testutil/deposits.go
Lines 134 to 140 in 1715693
cc: @AmauryM
For Admin Use
The text was updated successfully, but these errors were encountered: