File tree Expand file tree Collapse file tree 1 file changed +19
-10
lines changed
Expand file tree Collapse file tree 1 file changed +19
-10
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ if [[ "${TYPE}" == "MySQL" ]]; then
7575else
7676 SERVER_VERSION=$( mariadb -e " SELECT VERSION()" --skip-column-names ${HOST_STRING} -u" ${USER} " " ${PASSWORD_STRING} " )
7777fi
78+
7879VERSION=$( echo " ${SERVER_VERSION} " | grep -o ' ^[^-]*' )
7980MAJOR=$( echo " ${VERSION} " | cut -d. -f1)
8081MINOR=$( echo " ${VERSION} " | cut -d. -f2)
@@ -85,20 +86,28 @@ echo 'Checking if database is ready...'
8586
8687if [[ " ${TYPE} " == " MySQL" ]]; then
8788 while ! mysql ${HOST_STRING} --user=" ${USER} " " ${PASSWORD_STRING} " --execute=" SHOW DATABASES;" | grep ' information_schema' > /dev/null;
89+ do
90+ echo ' Waiting for database...'
91+ sleep 5
92+ i=$(( i+ 1 ))
93+ if [ $i -gt 36 ]; then
94+ echo ' Database failed to start. Aborting.'
95+ exit 1
96+ fi
97+ done
8898else
8999 while ! mariadb ${HOST_STRING} --user=" ${USER} " " ${PASSWORD_STRING} " --execute=" SHOW DATABASES;" | grep ' information_schema' > /dev/null;
100+ do
101+ echo ' Waiting for database...'
102+ sleep 5
103+ i=$(( i+ 1 ))
104+ if [ $i -gt 36 ]; then
105+ echo ' Database failed to start. Aborting.'
106+ exit 1
107+ fi
108+ done
90109fi
91110
92- do
93- echo ' Waiting for database...'
94- sleep 5
95- i=$(( i+ 1 ))
96- if [ $i -gt 36 ]; then
97- echo ' Database failed to start. Aborting.'
98- exit 1
99- fi
100- done
101-
102111# Prepare the database for running the tests with a MySQL version 8.0 or higher.
103112install_mysql_db_8_0_plus () {
104113 set -ex
You can’t perform that action at this time.
0 commit comments