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 14
14
jobs :
15
15
lint :
16
16
name : Lint
17
- runs-on : ubuntu-18.04
17
+ runs-on : ubuntu-latest
18
18
steps :
19
19
- uses : actions/checkout@v2
20
20
- name : Run Lint Script for Bazel/Pyupgrade/Black/Clang
@@ -196,6 +196,8 @@ jobs:
196
196
bash -x -e tests/test_pubsub/pubsub_test.sh
197
197
bash -x -e tests/test_aws/aws_test.sh
198
198
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
199
201
- name : Install ${{ matrix.python }} macOS
200
202
run : |
201
203
set -x -e
Original file line number Diff line number Diff line change @@ -43,21 +43,23 @@ docker run -d --rm --name=tfio-elasticsearch \
43
43
--ulimit memlock=-1:-1 \
44
44
${ELASTICSEARCH_IMAGE}
45
45
46
- echo " "
47
46
echo " 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
50
56
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'
57
57
58
58
echo " "
59
59
echo " Checking the healthcheck REST-API endpoint..."
60
60
echo " "
61
+ # The Authorization header contains the base64 encoded value of "elastic:default_password"
62
+ # As per the environment variable set while starting the container.
61
63
curl -X GET localhost:9200/_cluster/health --header ' Authorization: Basic ZWxhc3RpYzpkZWZhdWx0X3Bhc3N3b3Jk'
62
64
63
65
echo " "
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 \
35
35
echo " "
36
36
echo " Waiting for mongodb to be up and running..."
37
37
echo " "
38
- sleep 20
38
+ sleep 60
39
39
40
40
elif [ " $action " == " stop" ]; then
41
41
echo " "
You can’t perform that action at this time.
0 commit comments