Skip to content

Commit

Permalink
Add docs/comments explaining unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
theohax committed Jan 24, 2022
1 parent c788543 commit 9ecd690
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions nano/core_test/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4301,6 +4301,8 @@ TEST (rep_crawler, local)
}
}

// Test that a node configured with `enable_pruning` and `max_pruning_age = 1s` will automatically
// prune old confirmed blocks without explicitly saying `node.ledger_pruning` in the unit test
TEST (node, pruning_automatic)
{
nano::system system{};
Expand Down Expand Up @@ -4355,10 +4357,7 @@ TEST (node, pruning_automatic)
ASSERT_TRUE (node1.ledger.block_or_pruned_exists (send2->hash ()));
}

// Test disabled because it's failing intermittently.
// PR in which it got disabled: https://github.com/nanocurrency/nano-node/pull/3629
// Issue for investigating it: https://github.com/nanocurrency/nano-node/issues/3641
TEST (node, DISABLED_pruning_age)
TEST (node, pruning_age)
{
nano::system system{};

Expand Down Expand Up @@ -4419,6 +4418,8 @@ TEST (node, DISABLED_pruning_age)
ASSERT_TRUE (node1.ledger.block_or_pruned_exists (send2->hash ()));
}

// Test that a node configured with `enable_pruning` will
// prune DEEP-enough confirmed blocks by explicitly saying `node.ledger_pruning` in the unit test
TEST (node, pruning_depth)
{
nano::system system{};
Expand Down

0 comments on commit 9ecd690

Please sign in to comment.