When the node is constructed outside of a nano::system, if the test fails, the node will not be shut down and can result in other tests failing further on.
This commit is contained in:
parent
f12f5d54fb
commit
15b3945511
1 changed files with 2 additions and 3 deletions
|
|
@ -1434,13 +1434,13 @@ TEST (bootstrap_processor, wallet_lazy_pending)
|
||||||
.work (*node0->work_generate_blocking (receive1->hash ()))
|
.work (*node0->work_generate_blocking (receive1->hash ()))
|
||||||
.build_shared ();
|
.build_shared ();
|
||||||
|
|
||||||
// Processing test chain
|
// Processing test c`hain
|
||||||
node0->block_processor.add (send1);
|
node0->block_processor.add (send1);
|
||||||
node0->block_processor.add (receive1);
|
node0->block_processor.add (receive1);
|
||||||
node0->block_processor.add (send2);
|
node0->block_processor.add (send2);
|
||||||
node0->block_processor.flush ();
|
node0->block_processor.flush ();
|
||||||
// Start wallet lazy bootstrap
|
// Start wallet lazy bootstrap
|
||||||
auto node1 (std::make_shared<nano::node> (system.io_ctx, nano::get_available_port (), nano::unique_path (), system.logging, system.work));
|
auto node1 = system.add_node ();
|
||||||
node1->network.udp_channels.insert (node0->network.endpoint (), node1->network_params.network.protocol_version);
|
node1->network.udp_channels.insert (node0->network.endpoint (), node1->network_params.network.protocol_version);
|
||||||
auto wallet (node1->wallets.create (nano::random_wallet_id ()));
|
auto wallet (node1->wallets.create (nano::random_wallet_id ()));
|
||||||
ASSERT_NE (nullptr, wallet);
|
ASSERT_NE (nullptr, wallet);
|
||||||
|
|
@ -1448,7 +1448,6 @@ TEST (bootstrap_processor, wallet_lazy_pending)
|
||||||
node1->bootstrap_wallet ();
|
node1->bootstrap_wallet ();
|
||||||
// Check processed blocks
|
// Check processed blocks
|
||||||
ASSERT_TIMELY (10s, node1->ledger.block_or_pruned_exists (send2->hash ()));
|
ASSERT_TIMELY (10s, node1->ledger.block_or_pruned_exists (send2->hash ()));
|
||||||
node1->stop ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST (bootstrap_processor, multiple_attempts)
|
TEST (bootstrap_processor, multiple_attempts)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue