Fix sporadic failure of test case rpl.rpl_start_stop_slave

The test was expecting the I/O thread to be in a specific state, but thread
scheduling may cause it to not yet have reached that state. So just have a
loop that waits for the expected state to occur.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
This commit is contained in:
Kristian Nielsen 2024-08-19 22:27:44 +02:00
parent 25e0224814
commit 8642453ce6

View file

@ -19,7 +19,17 @@
--source include/master-slave.inc
connection slave;
--let $connection_id=`SELECT id FROM information_schema.processlist where state LIKE 'Waiting for master to send event'`
--let $i= 100
while ($i > 0) {
dec $i;
--let $connection_id=`SELECT id FROM information_schema.processlist where state LIKE 'Waiting for master to send event'`
if ($connection_id) {
let $i= 0;
}
if ($i > 0) {
--sleep 0.1
}
}
if(!$connection_id)
{