Commit 0d328d3
authored
TestTxGossipingAndAggregation fix (#1411)
<!--
Please read and fill out this form before submitting your PR.
Please make sure you have reviewed our contributors guide before
submitting your
first PR.
-->
## Overview
This test was failing periodically due to `FinalizeBlock` being called
too many times. The test verifies that at least N number of blocks were
produced, which means that more than N number of blocks could have been
produced which would lead to `FinalizeBlock` being called more than N
times.
This updates the test to check for `FinalizeBlock` being called at least
N times as well to match the check for the blocks.
The other alternate fix would be to enforce that only N blocks were
produced. I'm not sure if that is the preferred way to write the test or
not.
Unless we can control the block production by manually triggering a
block to be produced, checking for at least N blocks an calls will be
more robust.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Refactor**
- Improved the test verification process by introducing a new function
to streamline the checking of specific method calls during integration
tests.
- **Chores**
- Removed outdated commented code for cleaner and more maintainable
codebase.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 5db5840 commit 0d328d3
1 file changed
Lines changed: 24 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
185 | 193 | | |
186 | 194 | | |
187 | 195 | | |
188 | | - | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
189 | 211 | | |
190 | 212 | | |
191 | 213 | | |
192 | | - | |
| 214 | + | |
193 | 215 | | |
194 | 216 | | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | 217 | | |
217 | 218 | | |
218 | 219 | | |
| |||
0 commit comments