 621444e5e4
			
		
	
	621444e5e4
	
	
	
		
			
			Fixed missing newlines in the error output printf calls of sync_slaves. Changed the order of commands pers_02 executes to a more correct way.
		
			
				
	
	
		
			45 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| /**
 | |
|  * @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 "testconnections.h"
 | |
| #include "maxadmin_operations.h"
 | |
| 
 | |
| 
 | |
| int main(int argc, char *argv[])
 | |
| {
 | |
|     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(75, true, true, true, true);
 | |
| 
 | |
|     Test->stop_timeout();
 | |
|     Test->repl->close_connections();
 | |
|     Test->repl->stop_nodes();
 | |
|     Test->repl->start_replication();
 | |
|     Test->repl->connect();
 | |
|     Test->repl->sync_slaves();
 | |
| 
 | |
|     Test->set_timeout(60);
 | |
|     Test->repl->execute_query_all_nodes((char *) "set global max_connections = 2000;");
 | |
|     Test->add_result(Test->create_connections(70 , true, true, true, true),
 | |
|                      "Connections creation error \n");
 | |
| 
 | |
|     Test->check_log_err((char *) "fatal signal 11", false);
 | |
|     Test->check_maxscale_alive();
 | |
|     int rval = Test->global_result;
 | |
|     delete Test;
 | |
|     return rval;
 | |
| }
 |