Fix unit test failures (#289)

* fixed unit test failures from the recent merges

* fixed unit test failures from the recent merges
This commit is contained in:
pbattu123 2020-02-20 14:08:38 -04:00 committed by GitHub
parent 5188a686d9
commit b68e6ce854
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 4 deletions

View file

@ -59,6 +59,7 @@ BOOST_AUTO_TEST_CASE( two_node_network )
app1.register_plugin<graphene::account_history::account_history_plugin>();
boost::program_options::variables_map cfg;
cfg.emplace("p2p-endpoint", boost::program_options::variable_value(string("127.0.0.1:0"), false));
cfg.emplace("plugins", boost::program_options::variable_value(string(" "), false));
app1.initialize(app_dir.path(), cfg);
cfg.emplace("genesis-json", boost::program_options::variable_value(create_genesis_file(app_dir), false));

View file

@ -77,7 +77,7 @@ database_fixture::database_fixture()
std::cout << "running test " << boost::unit_test::framework::current_test_case().p_name << std::endl;
}
auto ahplugin = app.register_plugin<graphene::account_history::account_history_plugin>();
//auto ahplugin = app.register_plugin<graphene::account_history::account_history_plugin>();
auto mhplugin = app.register_plugin<graphene::market_history::market_history_plugin>();
auto bookieplugin = app.register_plugin<graphene::bookie::bookie_plugin>();
auto affiliateplugin = app.register_plugin<graphene::affiliate_stats::affiliate_stats_plugin>();

View file

@ -745,6 +745,8 @@ BOOST_FIXTURE_TEST_CASE( maintenance_interval, database_fixture )
PUSH_TX( db, trx, ~0 );
trx.operations.clear();
}
generate_block();
transfer(account_id_type()(db), nathan, asset(5000));
generate_blocks(maintenence_time - initial_properties.parameters.block_interval);
@ -959,18 +961,23 @@ BOOST_FIXTURE_TEST_CASE( pop_block_twice, database_fixture )
processed_transaction ptx;
account_object committee_account_object = committee_account(db);
generate_block(skip_flags);
// transfer from committee account to Sam account
transfer(committee_account_object, sam_account_object, core.amount(100000));
generate_block(skip_flags);
create_account("alice");
private_key_type charlie_key = generate_private_key("charlie");
create_account("charlie", charlie_key);
generate_block(skip_flags);
create_account("bob");
generate_block(skip_flags);
private_key_type bob_key = generate_private_key("bob");
create_account("bob", bob_key);
generate_block(skip_flags);
db.pop_block();
db.pop_block();
} catch(const fc::exception& e) {
edump( (e.to_detail_string()) );
throw;