diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2018-01-14 14:51:36 +0000 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2018-01-14 14:51:36 +0000 |
commit | 3f78365471d68728e6607ad49aaa6299f69c6f86 (patch) | |
tree | 1334d2974fee6884bd0a08f5f623add389e4f699 /test/scripts | |
parent | ba0e37b13c652435898f9b1050d6fe648875b125 (diff) |
Testsuite: wait for MySQL DB startup before inserting data
Diffstat (limited to 'test/scripts')
-rw-r--r-- | test/scripts/2610-MySQL/2610 | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/test/scripts/2610-MySQL/2610 b/test/scripts/2610-MySQL/2610 index b3e36a5a7..f5765c094 100644 --- a/test/scripts/2610-MySQL/2610 +++ b/test/scripts/2610-MySQL/2610 @@ -5,18 +5,16 @@ sudo rm -fr DIR/mysql perl system 'mysql_install_db --datadir=DIR/mysql'; **** -sudo rm test-stdout +sudo rm test-stdout test-stderr # # start a db server background mysqld_safe --datadir=DIR/mysql --log-error=DIR/mysql/log --port=PORT_N --socket=DIR/mysql/sock --pid-file=DIR/mysql/pidfile **** -sleep 1 -sudo rm test-stderr-server # -# insert some data +# wait for db startup, insert some data perl -system 'mysqladmin --protocol=TCP -P PORT_N -u root create test'; +system 'mysqladmin --protocol=TCP -P PORT_N --connect_timeout=1 --wait=5 -u root create test'; system 'mysql --protocol=TCP -P PORT_N -u root -D test \ -e "CREATE TABLE them ( name text, id text ); \ INSERT INTO them VALUES ( \'Philip Hazel\', \'ph10\' ); \ @@ -28,6 +26,7 @@ system 'mysql --protocol=TCP -P PORT_N -u root -D test \ INSERT INTO them VALUES ( CONCAT(CHAR(39), \'stquot\'), \'quote1\' ); \ "'; **** +sudo rm test-stderr-server # # exim -d-all+lookup -be |