File tree Expand file tree Collapse file tree 3 files changed +15
-11
lines changed Expand file tree Collapse file tree 3 files changed +15
-11
lines changed Original file line number Diff line number Diff line change 1414jobs :
1515 lint :
1616 name : Lint
17- runs-on : ubuntu-18.04
17+ runs-on : ubuntu-latest
1818 steps :
1919 - uses : actions/checkout@v2
2020 - name : Run Lint Script for Bazel/Pyupgrade/Black/Clang
@@ -196,6 +196,8 @@ jobs:
196196 bash -x -e tests/test_pubsub/pubsub_test.sh
197197 bash -x -e tests/test_aws/aws_test.sh
198198 bash -x -e tests/test_pulsar/pulsar_test.sh
199+ bash -x -e tests/test_elasticsearch/elasticsearch_test.sh start
200+ bash -x -e tests/test_mongodb/mongodb_test.sh start
199201 - name : Install ${{ matrix.python }} macOS
200202 run : |
201203 set -x -e
Original file line number Diff line number Diff line change @@ -43,21 +43,23 @@ docker run -d --rm --name=tfio-elasticsearch \
4343--ulimit memlock=-1:-1 \
4444${ELASTICSEARCH_IMAGE}
4545
46- echo " "
4746echo " Waiting for the elasticsearch cluster to be up and running..."
48- echo " "
49- sleep 20
47+ for i in {1..120}; do
48+ RESPONSE=$( curl -w ' %{http_code}' -H ' Authorization: Basic ZWxhc3RpYzpkZWZhdWx0X3Bhc3N3b3Jk' -so /dev/null -L localhost:9200/) || true
49+ if [[ $RESPONSE == 200 ]]; then
50+ echo " [$i ] Accessed base endpoint successfully"
51+ break
52+ fi
53+ echo " [$i ] Access base endpoint failed: $RESPONSE , sleep for 1 second"
54+ sleep 1
55+ done
5056
51- echo " "
52- echo " Checking the base REST-API endpoint..."
53- echo " "
54- # The Authorization header contains the base64 encoded value of "elastic:default_password"
55- # As per the environment variable set while starting the container.
56- curl -X GET localhost:9200/ --header ' Authorization: Basic ZWxhc3RpYzpkZWZhdWx0X3Bhc3N3b3Jk'
5757
5858echo " "
5959echo " Checking the healthcheck REST-API endpoint..."
6060echo " "
61+ # The Authorization header contains the base64 encoded value of "elastic:default_password"
62+ # As per the environment variable set while starting the container.
6163curl -X GET localhost:9200/_cluster/health --header ' Authorization: Basic ZWxhc3RpYzpkZWZhdWx0X3Bhc3N3b3Jk'
6264
6365echo " "
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ docker run --rm -d -p 27017-27019:27017-27019 --name tfio-mongodb \
3535echo " "
3636echo " Waiting for mongodb to be up and running..."
3737echo " "
38- sleep 20
38+ sleep 60
3939
4040elif [ " $action " == " stop" ]; then
4141echo " "
You can’t perform that action at this time.
0 commit comments