Merge branch '2.3' into 2.4
This commit is contained in:
46
system-test/pers_02.cpp
Normal file
46
system-test/pers_02.cpp
Normal file
@ -0,0 +1,46 @@
|
||||
/**
|
||||
* @file pers_02.cpp - Persistent connection tests - crash during Maxscale restart
|
||||
*
|
||||
* - Set max_connections to 20
|
||||
* - Open 75 connections to all Maxscale services
|
||||
* - Close connections
|
||||
* - Restart replication (stop all nodes and start them again, execute CHANGE MASTER TO again)
|
||||
* - Set max_connections to 2000
|
||||
* - Open 70 connections to all Maxscale services
|
||||
* - Close connections
|
||||
* - Check there is not crash during restart
|
||||
*/
|
||||
|
||||
|
||||
#include <maxtest/testconnections.hh>
|
||||
#include <maxtest/maxadmin_operations.hh>
|
||||
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
TestConnections::require_galera(true);
|
||||
TestConnections* Test = new TestConnections(argc, argv);
|
||||
|
||||
Test->set_timeout(60);
|
||||
Test->repl->execute_query_all_nodes((char*) "set global max_connections = 20;");
|
||||
Test->create_connections(0, 75, true, true, true, true);
|
||||
|
||||
Test->stop_timeout();
|
||||
Test->repl->stop_nodes();
|
||||
Test->repl->start_replication();
|
||||
Test->repl->close_connections();
|
||||
Test->repl->sync_slaves();
|
||||
|
||||
// Increase connection limits and wait a few seconds for the server to catch up
|
||||
Test->repl->execute_query_all_nodes((char*) "set global max_connections = 2000;");
|
||||
sleep(10);
|
||||
|
||||
Test->set_timeout(60);
|
||||
Test->add_result(Test->create_connections(0, 70, true, true, true, true),
|
||||
"Connections creation error \n");
|
||||
|
||||
Test->check_maxscale_alive(0);
|
||||
int rval = Test->global_result;
|
||||
delete Test;
|
||||
return rval;
|
||||
}
|
Reference in New Issue
Block a user