Fix test failures and add debug logging
Fixed test failures, increased some of the timeouts, added extra info level logging into rwsplit to help debug the test failures.
This commit is contained in:
parent
b451e89e35
commit
a33f09ad06
@ -4,8 +4,6 @@
|
||||
* - check SELECT from backend
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include <iostream>
|
||||
#include <unistd.h>
|
||||
#include "testconnections.h"
|
||||
@ -30,7 +28,7 @@ void check_val(MYSQL* conn, TestConnections* Test)
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
TestConnections * Test = new TestConnections(argc, argv);
|
||||
Test->set_timeout(10);
|
||||
Test->set_timeout(30);
|
||||
|
||||
Mariadb_nodes * nodes;
|
||||
if (strstr(Test->test_name, "galera") != NULL)
|
||||
@ -43,34 +41,13 @@ int main(int argc, char *argv[])
|
||||
nodes = Test->repl;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
iconv_t converter = iconv_open ("koi8-r", "utf-8");
|
||||
Test->tprintf("errno %d\n", errno);
|
||||
|
||||
char in_buf[] = "Кот";
|
||||
char out_buf[100];
|
||||
char *in_ptr = in_buf;
|
||||
char *out_ptr = out_buf;
|
||||
size_t in_size = strlen(in_buf);
|
||||
size_t out_size = 100;
|
||||
|
||||
size_t n = iconv(converter, &in_ptr, &in_size, &out_ptr, &out_size);
|
||||
|
||||
Test->tprintf("n = %d\n", n);
|
||||
//Test->tprintf("UTF-8: %s\n", out_buf);
|
||||
|
||||
iconv_close(converter);
|
||||
*/
|
||||
|
||||
Test->maxscales->connect_maxscale(0);
|
||||
Test->set_timeout(10);
|
||||
Test->set_timeout(30);
|
||||
nodes->connect();
|
||||
|
||||
Test->set_timeout(10);
|
||||
Test->set_timeout(30);
|
||||
MYSQL * conn = Test->maxscales->conn_rwsplit[0];
|
||||
|
||||
//Test->try_query(conn, (char *) "set names utf8mb4;");
|
||||
execute_query_silent(conn, (char *) "DROP TABLE t2;");
|
||||
Test->try_query(conn, (char *) "CREATE TABLE t2 (x varchar(10));");
|
||||
char sql[256];
|
||||
@ -79,6 +56,7 @@ int main(int argc, char *argv[])
|
||||
Test->stop_timeout();
|
||||
sleep(5);
|
||||
|
||||
Test->set_timeout(30);
|
||||
check_val(Test->maxscales->conn_rwsplit[0], Test);
|
||||
check_val(Test->maxscales->conn_master[0], Test);
|
||||
check_val(Test->maxscales->conn_slave[0], Test);
|
||||
@ -88,8 +66,7 @@ int main(int argc, char *argv[])
|
||||
Test->tprintf("Node %d\n", i);
|
||||
check_val(nodes->nodes[i], Test);
|
||||
}
|
||||
|
||||
//execute_query_silent(conn, (char *) "DROP TABLE t2;");
|
||||
Test->stop_timeout();
|
||||
|
||||
Test->check_maxscale_alive(0);
|
||||
int rval = Test->global_result;
|
||||
|
@ -20,7 +20,8 @@ int main(int argc, char *argv[])
|
||||
Test->set_timeout(100);
|
||||
Test->maxscales->execute_maxadmin_command(0, (char *) "show monitors");
|
||||
sleep(5);
|
||||
Test->check_log_err(0, (char *) "Failed to start monitor", true);
|
||||
// Servers should get the Auth Error state when credentials are bad
|
||||
Test->check_log_err(0, (char *) "Auth Error, Down", true);
|
||||
Test->check_log_err(0, (char *) "fatal signal 11", false);
|
||||
|
||||
Test->check_maxscale_processes(0, 1);
|
||||
|
@ -228,6 +228,7 @@ bool RWSplitSession::route_single_stmt(GWBUF *querybuf)
|
||||
// We need to wait until the session commands are executed
|
||||
m_expected_responses++;
|
||||
m_query_queue = gwbuf_append(m_query_queue, gwbuf_clone(querybuf));
|
||||
MXS_INFO("Queuing query until '%s' completes session command", target->name());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -199,6 +199,7 @@ bool RWSplitSession::route_stored_query()
|
||||
* to wait for a response before attempting another reroute */
|
||||
while (m_query_queue)
|
||||
{
|
||||
MXS_INFO("Routing stored queries");
|
||||
GWBUF* query_queue = modutil_get_next_MySQL_packet(&m_query_queue);
|
||||
query_queue = gwbuf_make_contiguous(query_queue);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user