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:
Niclas Antti
2018-09-09 22:26:19 +03:00
parent fa7ec95069
commit c447e5cf15
849 changed files with 35002 additions and 27238 deletions

View File

@ -10,14 +10,13 @@ int main(int argc, char** argv)
{
TestConnections test(argc, argv);
auto do_test = [&]()
{
test.set_timeout(20);
test.maxscales->connect();
test.try_query(test.maxscales->conn_master[0], "SELECT 1");
test.maxscales->disconnect();
test.stop_timeout();
};
auto do_test = [&]() {
test.set_timeout(20);
test.maxscales->connect();
test.try_query(test.maxscales->conn_master[0], "SELECT 1");
test.maxscales->disconnect();
test.stop_timeout();
};
test.tprintf("Testing with both master and slave up");
do_test();
@ -49,8 +48,11 @@ int main(int argc, char** argv)
{
// Open a connection and make sure it works
test.set_timeout(20);
MYSQL* conn = open_conn(test.maxscales->readconn_master_port[0], test.maxscales->IP[0],
"mxs1743", "mxs1743", false);
MYSQL* conn = open_conn(test.maxscales->readconn_master_port[0],
test.maxscales->IP[0],
"mxs1743",
"mxs1743",
false);
test.try_query(conn, "SELECT 1");
connections.push_back(conn);
test.stop_timeout();
@ -59,7 +61,8 @@ int main(int argc, char** argv)
// Give the connections a few seconds to establish
sleep(5);
std::string query = "SELECT COUNT(*) AS connections FROM information_schema.processlist WHERE user = 'mxs1743'";
std::string query
= "SELECT COUNT(*) AS connections FROM information_schema.processlist WHERE user = 'mxs1743'";
char master_connections[1024];
char slave_connections[1024];
find_field(test.repl->nodes[0], query.c_str(), "connections", master_connections);
@ -67,9 +70,10 @@ int main(int argc, char** argv)
test.assert(strcmp(master_connections, slave_connections) == 0,
"Master and slave shoud have the same amount of connections: %s != %s",
master_connections, slave_connections);
master_connections,
slave_connections);
for (auto a: connections)
for (auto a : connections)
{
mysql_close(a);
}