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:
@ -8,7 +8,7 @@
|
||||
#define MONITOR_NAME "mysql-monitor"
|
||||
#define SERVICE_NAME "rwsplit-service"
|
||||
|
||||
void add_servers(TestConnections *test)
|
||||
void add_servers(TestConnections* test)
|
||||
{
|
||||
test->tprintf("Adding the servers");
|
||||
test->set_timeout(120);
|
||||
@ -21,7 +21,7 @@ void add_servers(TestConnections *test)
|
||||
test->stop_timeout();
|
||||
}
|
||||
|
||||
void remove_servers(TestConnections *test)
|
||||
void remove_servers(TestConnections* test)
|
||||
{
|
||||
test->tprintf("Remove the servers");
|
||||
test->set_timeout(120);
|
||||
@ -34,7 +34,7 @@ void remove_servers(TestConnections *test)
|
||||
test->stop_timeout();
|
||||
}
|
||||
|
||||
void destroy_servers(TestConnections *test)
|
||||
void destroy_servers(TestConnections* test)
|
||||
{
|
||||
test->tprintf("Destroy the servers");
|
||||
test->set_timeout(120);
|
||||
@ -46,7 +46,7 @@ void destroy_servers(TestConnections *test)
|
||||
test->stop_timeout();
|
||||
}
|
||||
|
||||
void do_query(TestConnections *test, bool should_fail)
|
||||
void do_query(TestConnections* test, bool should_fail)
|
||||
{
|
||||
test->tprintf("Trying to query, expecting %s", should_fail ? "failure" : "success");
|
||||
test->set_timeout(120);
|
||||
@ -55,9 +55,9 @@ void do_query(TestConnections *test, bool should_fail)
|
||||
|
||||
bool failed = execute_query(test->maxscales->conn_rwsplit[0], "select @@server_id") == 0;
|
||||
|
||||
const char *msg = should_fail ?
|
||||
"Query was successful when failure was expected." :
|
||||
"Query failed when success was expected.";
|
||||
const char* msg = should_fail
|
||||
? "Query was successful when failure was expected."
|
||||
: "Query failed when success was expected.";
|
||||
|
||||
test->add_result(failed == should_fail, msg);
|
||||
test->maxscales->close_maxscale_connections(0);
|
||||
@ -65,16 +65,19 @@ void do_query(TestConnections *test, bool should_fail)
|
||||
test->stop_timeout();
|
||||
}
|
||||
|
||||
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->tprintf("Creating servers with bad addresses");
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
test->maxscales->ssh_node_f(0, true, "maxadmin create server server%d 3306 %s",
|
||||
i + 1, test->repl->IP[i]);
|
||||
test->maxscales->ssh_node_f(0,
|
||||
true,
|
||||
"maxadmin create server server%d 3306 %s",
|
||||
i + 1,
|
||||
test->repl->IP[i]);
|
||||
}
|
||||
|
||||
/** Add the servers to the monitor and service */
|
||||
@ -89,7 +92,11 @@ int main(int argc, char *argv[])
|
||||
test->tprintf("Create the servers with correct parameters");
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
test->maxscales->ssh_node_f(0, true, "maxadmin create server server%d %s %d", i + 1, test->repl->IP[i],
|
||||
test->maxscales->ssh_node_f(0,
|
||||
true,
|
||||
"maxadmin create server server%d %s %d",
|
||||
i + 1,
|
||||
test->repl->IP[i],
|
||||
test->repl->port[i]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user