Fix random CI failure for TestFeeGrant integration test#99
Conversation
TxCorpi0x
left a comment
There was a problem hiding this comment.
@TxCorpi0x made 1 comment.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on masihyeganeh, metalarm10, miladz68, and ysv).
integration-tests/modules/feegrant_test.go line 112 at r1 (raw file):
} if !header.Time.After(allowanceExpiration) { return retry.Retryable(errors.Errorf(
Instead of retrying, can't we check before expiration? so we don't need the retry then
if header.Time.Before(expirationTime) {
return Err
}
metalarm10
left a comment
There was a problem hiding this comment.
@metalarm10 made 1 comment.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on masihyeganeh, miladz68, TxCorpi0x, and ysv).
integration-tests/modules/feegrant_test.go line 112 at r1 (raw file):
Previously, TxCorpi0x wrote…
Instead of retrying, can't we check before expiration? so we don't need the retry then
if header.Time.Before(expirationTime) { return Err }
Done.
TxCorpi0x
left a comment
There was a problem hiding this comment.
@TxCorpi0x reviewed 1 file and all commit messages, and resolved 1 discussion.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on masihyeganeh, miladz68, and ysv).
miladz68
left a comment
There was a problem hiding this comment.
@miladz68 reviewed 1 file and all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on masihyeganeh and ysv).
Description
This PR fixes random CI failure for upgrade integration tests, reported in https://app.clickup.com/t/868gpr0g3
TestFeeGrantsets an allowance expiration toblockTime + 10s, then callsAwaitNextBlocks(10)before pruning.With
TimeoutCommitat 500ms, 10 blocks ≈ 5-6s of chain time — not enough for expiration. Prune becomes bypassed and the assertion fails.It's random because under heavy CI load, the blocks might be slower (pushing 10 blocks past the 10s threshold).
Proposed Solution: Fixed by replacing
AwaitNextBlockswithAwaitState, which polls the latest blocktimestamp until it exceeds the expiration. This guarantees the allowance is expired before pruning, regardless of block production speed.
Reviewers checklist:
Authors checklist
This change is