Skip to content
New issue

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

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

Already on GitHub? # to your account

Introduce nano::test::start_election method #4100

Merged

Conversation

dsiganos
Copy link
Contributor

@dsiganos dsiganos commented Feb 3, 2023

In many tests, we currently use the method node::block_confirm(), which uses scheduler flush and often block processor flush is called just before it too. The flush functions are unreliable and we plan to delete them.

I introduce the method start_election with the aim of replacing node::block_confirm in unit tests.

I converted a several unit tests to test it. I will do the rest too if there are no objections to this approach.

In many tests, we currently use the method node::block_confirm(), which
uses block processor flush and is therefore broken. It is also terribly
named.

I introduce the method start_election with the aim of replacing
node::block_confirm in unit tests.

I converted a few unit tests to use this new function.
@dsiganos dsiganos force-pushed the introduce_system_start_election branch from b23fb23 to dbeea3a Compare February 3, 2023 01:52
clemahieu
clemahieu previously approved these changes Feb 6, 2023
nano/test_common/system.cpp Outdated Show resolved Hide resolved
nano/test_common/system.cpp Outdated Show resolved Hide resolved
@dsiganos dsiganos changed the title Introduce system::start_election method Introduce nano::test::start_election method Feb 7, 2023
@dsiganos dsiganos force-pushed the introduce_system_start_election branch from 47e6ae2 to c340b10 Compare February 7, 2023 20:58
@dsiganos dsiganos merged commit 352f66a into nanocurrency:develop Feb 8, 2023
@dsiganos dsiganos deleted the introduce_system_start_election branch February 8, 2023 12:39
@thsfs thsfs added the unit test Related to a new, changed or fixed unit test label May 22, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
unit test Related to a new, changed or fixed unit test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants