 b54dca50b5
			
		
	
	b54dca50b5
	
	
	
		
			
			Some of the tests waited for excessively long periods of time for changes to propagate. With a one second monitor interval, a sleep of around five seconds should be plenty enough for all monitor related changes to be propagated to all systems.
		
			
				
	
	
		
			45 lines
		
	
	
		
			998 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			998 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /**
 | |
|  * @file bug676.cpp  reproducing attempt for bug676
 | |
|  * - connect to RWSplit
 | |
|  * - stop node0
 | |
|  * - sleep 20 seconds
 | |
|  * - reconnect
 | |
|  * - check if 'USE test' is ok
 | |
|  * - check MaxScale is alive
 | |
|  */
 | |
| 
 | |
| #include <iostream>
 | |
| #include "testconnections.h"
 | |
| #include "mariadb_func.h"
 | |
| 
 | |
| int main(int argc, char *argv[])
 | |
| {
 | |
|     TestConnections test(argc, argv);
 | |
| 
 | |
|     test.set_timeout(30);
 | |
| 
 | |
|     test.maxscales->connect_maxscale(0);
 | |
|     test.tprintf("Stopping node 0");
 | |
|     test.galera->block_node(0);
 | |
|     test.maxscales->close_maxscale_connections(0);
 | |
| 
 | |
|     test.stop_timeout();
 | |
| 
 | |
|     test.tprintf("Waiting until the monitor picks a new master");
 | |
|     sleep(5);
 | |
| 
 | |
|     test.set_timeout(30);
 | |
| 
 | |
|     test.maxscales->connect_maxscale(0);
 | |
|     test.try_query(test.maxscales->conn_rwsplit[0], "USE test");
 | |
|     test.try_query(test.maxscales->conn_rwsplit[0], "show processlist;");
 | |
|     test.maxscales->close_maxscale_connections(0);
 | |
| 
 | |
|     test.stop_timeout();
 | |
| 
 | |
|     test.galera->unblock_node(0);
 | |
| 
 | |
|     return test.global_result;
 | |
| }
 | |
| 
 |