Fix intermittent test issue and cleanup unused vars (#2108)

This commit is contained in:
cryptocode 2019-06-26 22:35:02 +02:00 committed by GitHub
commit 305d2bab34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 7 deletions

View file

@ -86,7 +86,6 @@ TEST (active_transactions, adjusted_difficulty_priority)
TEST (active_transactions, keep_local)
{
bool delay_frontier_confirmation_height_updating = true;
nano::system system;
nano::node_config node_config (24000, system.logging);
node_config.enable_voting = false;

View file

@ -767,7 +767,6 @@ TEST (block_store, cemented_count)
auto transaction (store.tx_begin_write ());
ASSERT_EQ (0, store.cemented_count (transaction));
nano::genesis genesis;
auto hash (genesis.hash ());
store.initialize (transaction, genesis);
ASSERT_EQ (1, store.cemented_count (transaction));
}

View file

@ -2218,7 +2218,6 @@ TEST (confirmation_height, pending_observer_callbacks)
nano::block_hash latest (node->latest (nano::test_genesis_key.pub));
nano::keypair key1;
auto & store = node->store;
nano::send_block send (latest, key1.pub, nano::genesis_amount - nano::Gxrb_ratio, nano::test_genesis_key.prv, nano::test_genesis_key.pub, system.work.generate (latest));
auto send1 = std::make_shared<nano::send_block> (send.hash (), key1.pub, nano::genesis_amount - nano::Gxrb_ratio * 2, nano::test_genesis_key.prv, nano::test_genesis_key.pub, system.work.generate (send.hash ()));

View file

@ -2310,10 +2310,10 @@ TEST (node, vote_by_hash_bundle)
system.nodes[0]->block_confirm (send);
}
// Verify bundling. We're content with 8 hashes for the test, although
// reaching 12 should be common on most hardware.
system.deadline_set (10s);
while (max_hashes.load () < 8)
// Verify that bundling occurs. While reaching 12 should be common on most hardware in release mode,
// we set this low enough to allow the test to pass on CI/with santitizers.
system.deadline_set (20s);
while (max_hashes.load () < 3)
{
ASSERT_NO_ERROR (system.poll ());
}