Skip to content

Commit 1ffb8c9

Browse files
committed
travis: use mysql client inside the docker container for polling
1 parent 55cb261 commit 1ffb8c9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.travis/wait_mysql.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
#!/bin/sh
2+
3+
# use the mysql client inside the docker container if docker is running
4+
[ "$(docker inspect -f '{{.State.Running}}' mysqld 2>/dev/null)" = "true" ] && mysql() {
5+
docker exec mysqld mysql "${@}"
6+
}
7+
28
while :
39
do
4-
if mysql -e 'select version()' 2>&1 | grep 'version()\|ERROR 2059 (HY000):'; then
10+
if mysql -e 'select version()'; then
511
break
612
fi
713
sleep 3

0 commit comments

Comments
 (0)