Uncrustify maxscale
See script directory for method. The script to run in the top level MaxScale directory is called maxscale-uncrustify.sh, which uses another script, list-src, from the same directory (so you need to set your PATH). The uncrustify version was 0.66.
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
/**
|
||||
* @file readconnrouter_slave.cpp Creates 100 connections to ReadConn in slave mode and check if connections are distributed among all slaves
|
||||
* @file readconnrouter_slave.cpp Creates 100 connections to ReadConn in slave mode and check if connections
|
||||
*are distributed among all slaves
|
||||
*
|
||||
* - create 100 connections to ReadConn slave
|
||||
* - check if all slave have equal number of connections (+-1)
|
||||
@ -11,14 +12,14 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
TestConnections * Test = new TestConnections(argc, argv);
|
||||
TestConnections* Test = new TestConnections(argc, argv);
|
||||
Test->set_timeout(100);
|
||||
Test->repl->connect();
|
||||
|
||||
const int TestConnNum = 100;
|
||||
MYSQL *conn[TestConnNum];
|
||||
MYSQL* conn[TestConnNum];
|
||||
int i;
|
||||
int conn_num;
|
||||
|
||||
@ -35,14 +36,21 @@ int main(int argc, char *argv[])
|
||||
int TotalConn = 0;
|
||||
|
||||
Test->tprintf("Checking connections to Master: should be 0\n");
|
||||
conn_num = get_conn_num(Test->repl->nodes[0], Test->maxscales->ip(0), Test->maxscales->hostname[0], (char *) "test");
|
||||
conn_num = get_conn_num(Test->repl->nodes[0],
|
||||
Test->maxscales->ip(0),
|
||||
Test->maxscales->hostname[0],
|
||||
(char*) "test");
|
||||
Test->add_result(conn_num, "number of connections to Master is %d\n", conn_num);
|
||||
|
||||
Test->tprintf("Number of connections to each slave should be between %d and %d\n", ConnFloor, ConnCell);
|
||||
Test->tprintf("Checking connections to each node\n");
|
||||
for (int i = 1; i < Test->repl->N; i++)
|
||||
{
|
||||
conn_num = get_conn_num(Test->repl->nodes[i], Test->maxscales->ip(0), Test->maxscales->hostname[0], (char *) "test");
|
||||
conn_num
|
||||
= get_conn_num(Test->repl->nodes[i],
|
||||
Test->maxscales->ip(0),
|
||||
Test->maxscales->hostname[0],
|
||||
(char*) "test");
|
||||
TotalConn += conn_num;
|
||||
printf("Connections to node %d (%s):\t%d\n", i, Test->repl->IP[i], conn_num);
|
||||
if ((conn_num > ConnCell) || (conn_num < ConnFloor))
|
||||
@ -66,6 +74,3 @@ int main(int argc, char *argv[])
|
||||
delete Test;
|
||||
return rval;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user