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
---
mysql-test/suite/rpl/t/rpl_start_stop_slave.test | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/mysql-test/suite/rpl/t/rpl_start_stop_slave.test b/mysql-test/suite/rpl/t/rpl_start_stop_slave.test
index 23b25b1bf85..ce7d51ca43d 100644
--- a/mysql-test/suite/rpl/t/rpl_start_stop_slave.test
+++ b/mysql-test/suite/rpl/t/rpl_start_stop_slave.test
@@ -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)
{
--
2.39.2