test(mempool): enhanced TestReactorNoBroadcastToSender#4127
Conversation
|
Now that the mempool has lanes, the generated transactions will be assigned to different lanes, therefore they will arrive to the second node in a different order than FIFO. So one way to fix the test is to change the last line to only check that txs have arrived to the second reactor's mempool (with If you still want to check that they have arrived in order, don't use lanes in this test. That will require more changes in the auxiliary functions because you will need to create the apps without lanes, with |
hvanz
left a comment
There was a problem hiding this comment.
Thanks for improving the test! As mentioned elsewhere, it would be better to test also the case with more than one lane, but the test in this PR is already better than the original one.
The test should be able now to catch the error introduced by #3657. ---- To see how it would break, please checkout the branch `cason/test-nobroadcastsender`, then: ``` $ cd mempool $ go test -v -run TestReactorNoBroadcastToSender ``` And wait it to fail, after 2 minutes. You are going to see the busy-loop around, logs entries starting with `Skipping tx`, forever for the same transaction. Important: the test unit only works in the traditional mempool design, without lanes. We should consider adding a variant of it that should also pass when lanes are considered. --- #### PR checklist - [x] Tests written/updated - [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit 9e25845) # Conflicts: # mempool/reactor.go # mempool/reactor_test.go
) (#4182) The test should be able now to catch the error introduced by #3657. FOR REVIEWERS: the 91ab7a7 commit was reverted in this backport, since mempool lanes is not implemented in `v1.x`. #### PR checklist - [x] Tests written/updated - [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments <hr>This is an automatic backport of pull request #4127 done by [Mergify](https://mergify.com). --------- Co-authored-by: Daniel <daniel.cason@informal.systems>
The test should be able now to catch the error introduced by cometbft#3657. ---- To see how it would break, please checkout the branch `cason/test-nobroadcastsender`, then: ``` $ cd mempool $ go test -v -run TestReactorNoBroadcastToSender ``` And wait it to fail, after 2 minutes. You are going to see the busy-loop around, logs entries starting with `Skipping tx`, forever for the same transaction. Important: the test unit only works in the traditional mempool design, without lanes. We should consider adding a variant of it that should also pass when lanes are considered. --- - [x] Tests written/updated - [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
The test should be able now to catch the error introduced by cometbft#3657. ---- To see how it would break, please checkout the branch `cason/test-nobroadcastsender`, then: ``` $ cd mempool $ go test -v -run TestReactorNoBroadcastToSender ``` And wait it to fail, after 2 minutes. You are going to see the busy-loop around, logs entries starting with `Skipping tx`, forever for the same transaction. Important: the test unit only works in the traditional mempool design, without lanes. We should consider adding a variant of it that should also pass when lanes are considered. --- - [x] Tests written/updated - [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog) - [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
The test should be able now to catch the error introduced by #3657.
To see how it would break, please checkout the branch
cason/test-nobroadcastsender, then:And wait it to fail, after 2 minutes. You are going to see the busy-loop around, logs entries starting with
Skipping tx, forever for the same transaction.Important: the test unit only works in the traditional mempool design, without lanes. We should consider adding a variant of it that should also pass when lanes are considered.
PR checklist
.changelog(we use unclog to manage our changelog)docs/orspec/) and code comments