diff --git a/rubygem-mysql2.spec b/rubygem-mysql2.spec index 1571e18..64740f3 100644 --- a/rubygem-mysql2.spec +++ b/rubygem-mysql2.spec @@ -112,11 +112,17 @@ mysql_install_db \ # https://bugzilla.redhat.com/show_bug.cgi?id=2144488 for i in $(seq 10); do + echo "Waiting for the DB server to accept connections ... ${i}" sleep 1 - if grep -q 'ready for connections.' "${MYSQL_TEST_LOG}"; then + if grep -q 'ready for connections' "${MYSQL_TEST_LOG}"; then break + elif [ $i -eq 10 ]; then + echo "ERROR: the DB server hasn't come online !" + echo " the testuite can't be run !" + echo "Here follows the DB server log: " + cat "${MYSQL_TEST_LOG}" + exit 1 fi - echo "Waiting connections... ${i}" done # This GC method call is problematic on ppc64le builders, stalling the tests execution.