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

Fix node.pruning_* unit tests #3687

Merged
merged 2 commits into from
Jan 24, 2022
Merged

Conversation

theohax
Copy link
Contributor

@theohax theohax commented Jan 23, 2022

One more batch of fixes, put them in the same PR due to the tests being fairly similar to one another.

One of them (node.pruning_age) just very recently was disabled in #3629, so linking the respective issue (#3641) to this PR.

@theohax theohax added bug unit test Related to a new, changed or fixed unit test labels Jan 23, 2022
ASSERT_TRUE (node1.ledger.block_or_pruned_exists (nano::dev::genesis->hash ()));
ASSERT_TRUE (node1.ledger.block_or_pruned_exists (send1->hash ())); // true for pruned
ASSERT_TRUE (node1.ledger.block_or_pruned_exists (send1->hash ()));
Copy link
Contributor

@thsfs thsfs Jan 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't remove this comment as it is there to facilitate debugging. If you have more info to add about the tests please do so.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did add some relevant comments at the beginning of the tests.

dsiganos
dsiganos previously approved these changes Jan 24, 2022
@@ -4300,161 +4300,176 @@ TEST (rep_crawler, local)

TEST (node, pruning_automatic)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a comment describing the intention of this unit test?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do, thanks

@theohax theohax force-pushed the fix-node.pruning_xxx-unit-tests branch from 90826c4 to 9ecd690 Compare January 24, 2022 15:53
@theohax theohax linked an issue Jan 24, 2022 that may be closed by this pull request
@zhyatt zhyatt added this to the V24.0 milestone Jan 24, 2022
@theohax theohax merged commit 1cd7167 into develop Jan 24, 2022
@theohax theohax deleted the fix-node.pruning_xxx-unit-tests branch January 24, 2022 23:43
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug unit test Related to a new, changed or fixed unit test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unit test node.pruning_age intermittently failing
4 participants