Skip to content

Commit

Permalink
fix: fix e2e unstable (#2684)
Browse files Browse the repository at this point in the history
Co-authored-by: aias00 <[email protected]>
Co-authored-by: shown <[email protected]>
  • Loading branch information
3 people authored Sep 8, 2024
1 parent c153433 commit 6a852b2
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions e2e/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,25 @@ services:
- ./data/:/work/data/
- ./testsuite.yaml:/work/testsuite.yaml
- ./report/report.md:/report.md
command: atest run -p /work/testsuite.yaml --level warn --thread 3 --report md --report-file /report.md
command: atest run -p /work/testsuite.yaml --level debug --thread 3 --report md --report-file /report.md
depends_on:
hertzbeat:
checker:
condition: service_healthy
links:
- hertzbeat

- checker
checker:
image: alpine:latest
container_name: e2e-checker
command: sh -c "apk add --update curl && tail -f /dev/null"
healthcheck:
test: [ "CMD-SHELL",
"curl -s -X POST -H \"Content-Type: application/json\" -d '{\"type\": 0,\"identifier\": \"admin\",\"credential\": \"hertzbeat\"}' http://hertzbeat:1157/api/account/auth/form | grep -q token"
]
interval: 3s
timeout: 60s
retries: 10
start_period: 10s
hertzbeat:
image: apache/hertzbeat:test
container_name: e2e-hertzbeat
Expand All @@ -42,9 +54,3 @@ services:
- "1157:1157"
environment:
ALLOW_NONE_AUTHENTICATION: "yes"
healthcheck:
test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/1157"]
interval: 3s
timeout: 60s
retries: 10
start_period: 3s

0 comments on commit 6a852b2

Please sign in to comment.