From 2fdb88e870ec3452310ca5eff72aaca31130db2a Mon Sep 17 00:00:00 2001 From: Kristian Nielsen Date: Wed, 29 Oct 2014 14:44:40 +0100 Subject: [PATCH] Fix a spurious test failure in rpl.rpl_show_slave_hosts The test case runs SHOW SLAVE HOSTS. The output of this is only stable after all slaves have had time to register with the master; this happens asynchroneously. The test was waiting for the slave with server_id=3 to appear in the output, but it was missing a similar wait for server_id=2. Thus, if server_id=2 was much slower to connect for some reason, it could be missing from the output, causing the test to fail. --- mysql-test/suite/rpl/t/rpl_show_slave_hosts.test | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mysql-test/suite/rpl/t/rpl_show_slave_hosts.test b/mysql-test/suite/rpl/t/rpl_show_slave_hosts.test index 7ba5e90b96d..84c5c215a08 100644 --- a/mysql-test/suite/rpl/t/rpl_show_slave_hosts.test +++ b/mysql-test/suite/rpl/t/rpl_show_slave_hosts.test @@ -25,6 +25,11 @@ let $field= Server_id; # 3 is server_id of slave2. let $condition= ='3'; source include/wait_show_condition.inc; +# Make sure that the other slave also had time to register. Otherwise we get +# occasional spurious failures where server_id=2 is missing from SHOW SLAVE +# HOSTS, when that slave is much slower to register due to thread scheduling. +let $condition= ='2'; +source include/wait_show_condition.inc; --replace_column 3 'SLAVE_PORT' --replace_result $SLAVE_MYPORT SLAVE_PORT $DEFAULT_MASTER_PORT DEFAULT_PORT SHOW SLAVE HOSTS;