当前位置: 首页>>代码示例>>C++>>正文


C++ TestConnections::execute_maxadmin_command方法代码示例

本文整理汇总了C++中TestConnections::execute_maxadmin_command方法的典型用法代码示例。如果您正苦于以下问题:C++ TestConnections::execute_maxadmin_command方法的具体用法?C++ TestConnections::execute_maxadmin_command怎么用?C++ TestConnections::execute_maxadmin_command使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TestConnections的用法示例。


在下文中一共展示了TestConnections::execute_maxadmin_command方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: main

int main(int argc, char *argv[])
{
    TestConnections * Test = new TestConnections(argc, argv);
    Test->set_timeout(100);
    Test->execute_maxadmin_command((char *) "show monitors");
    sleep(5);
    Test->check_log_err((char *) "Failed to start monitor", true);
    Test->check_log_err((char *) "fatal signal 11", false);

    Test->check_maxscale_processes(1);

    int rval = Test->global_result;
    delete Test;
    return rval;
}
开发者ID:mariadb-corporation,项目名称:maxscale-system-test,代码行数:15,代码来源:show_monitor_crash.cpp

示例2: main

int main(int argc, char *argv[])
{
    TestConnections * Test = new TestConnections(argc, argv);
    Test->set_timeout(30);

    Test->galera->connect();

    tolerance = 0;

    // connect to the MaxScale server (rwsplit)
    Test->connect_rwsplit();

    Test->execute_maxadmin_command((char *) "shutdown monitor \"Galera Monitor\"");

    if (Test->conn_rwsplit == NULL )
    {
        Test->add_result(1, "Can't connect to MaxScale\n");
        int rval = Test->global_result;
        delete Test;
        exit(1);
    }
    else
    {

        Test->try_query(Test->conn_rwsplit, "DROP TABLE IF EXISTS t1;");
        Test->try_query(Test->conn_rwsplit, "create table t1 (x1 int);");

        get_global_status_allnodes(&selects[0], &inserts[0], Test->galera, silent);
        Test->try_query(Test->conn_rwsplit, "select * from t1;");
        get_global_status_allnodes(&new_selects[0], &new_inserts[0], Test->galera, silent);
        print_delta(&new_selects[0], &new_inserts[0], &selects[0], &inserts[0], Test->galera->N);

        Test->try_query(Test->conn_rwsplit, "insert into t1 values(1);");
        get_global_status_allnodes(&new_selects[0], &new_inserts[0], Test->galera, silent);
        print_delta(&new_selects[0], &new_inserts[0], &selects[0], &inserts[0], Test->galera->N);

        // close connections
        Test->close_rwsplit();
    }
    Test->galera->close_connections();

    int rval = Test->global_result;
    delete Test;
    return rval;
}
开发者ID:mariadb-corporation,项目名称:maxscale-system-test,代码行数:45,代码来源:rw_galera_select_insert.cpp


注:本文中的TestConnections::execute_maxadmin_command方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。