Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unit test active_transactions.fifo occasionally fails #4358

Open
dsiganos opened this issue Jan 12, 2024 · 0 comments
Open

unit test active_transactions.fifo occasionally fails #4358

dsiganos opened this issue Jan 12, 2024 · 0 comments
Labels
unit test Related to a new, changed or fixed unit test

Comments

@dsiganos
Copy link
Contributor

The unit test occasionally fails because it expects an election to be dropped once and the election is dropped twice.
This might be due to more than one elections starting for the same block due to race conditions.
This is usally reproduced on my laptop by running the test 1000 times and starting a parallel nano-node compilation.

[ RUN ] active_transactions.fifo
D:\a\nano-node\nano-node\nano\core_test\active_transactions.cpp(1413): error: Expected equality of these values:
1
node.stats.count (nano::stat::type::active_dropped, nano::stat::detail::normal)
Which is: 2
[ FAILED ] active_transactions.fifo (579 ms)

We could fix this by expecting the counter to be any number larger than one but maybe we should also eliminate those duplicate election starts...

@dsiganos dsiganos added the unit test Related to a new, changed or fixed unit test label Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unit test Related to a new, changed or fixed unit test
Projects
None yet
Development

No branches or pull requests

1 participant