Skip to content

Commit d24e876

Browse files
authored
Merge pull request #59 from tddwizard/travis
Wait for ElasticSearch only when and if needed
2 parents 70dc223 + 2785288 commit d24e876

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ before_install:
3636
- sudo service elasticsearch restart
3737
before_script:
3838
- |
39-
sleep 10
4039
[[ $COVERAGE == "true" ]] || phpenv config-rm xdebug.ini
4140
./.travis/before_script.sh
4241
script: phpunit -c magento2/dev/tests/$TEST_SUITE `[[ $COVERAGE == "true" ]] && echo "--coverage-text --coverage-clover=/tmp/coverage.clover"`

.travis/before_script.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,7 @@ case $TEST_SUITE in
4848
sed -i '/amqp/d' etc/install-config-mysql.php
4949

5050
cd ../../..
51+
echo "Wait for ElasticSearch on port 9200..."
52+
curl -X GET localhost:9200/_cluster/health?wait_for_status=yellow&timeout=10s
5153
;;
5254
esac

0 commit comments

Comments
 (0)