Beispiel #1
0
static void init_application_impl(session &sess, const std::string &app_name, nodes_data &data)
{
    node_info info = node_info::create(data, sess.get_groups());

    ELLIPTICS_REQUIRE(exec_result, sess.exec(NULL, app_name + "@init", info.pack()));

    sync_exec_result result = exec_result;
    BOOST_REQUIRE_EQUAL(result.size(), data.nodes.size());
    for (auto it = result.begin(); it != result.end(); ++it)
        BOOST_REQUIRE_EQUAL(it->context().data().to_string(), "inited");
}
Beispiel #2
0
void init_application_impl(session &sess, const std::string &app_name, const nodes_data *setup)
{
	sess.set_timeout(600);
	auto log = sess.get_logger();
	DNET_LOG_INFO(log, "Sending @init");

	node_info info = node_info_create(setup, sess.get_groups());

	ELLIPTICS_REQUIRE(exec_result, sess.exec(NULL, app_name + "@init", info.pack()));

	sync_exec_result result = exec_result;
	BOOST_REQUIRE_EQUAL(result.size(), setup->nodes.size());
	for (auto it = result.begin(); it != result.end(); ++it)
		BOOST_REQUIRE_EQUAL(it->context().data().to_string(), "inited");
}