This is an automated email from the ASF dual-hosted git repository.

liuhongyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hertzbeat.git


The following commit(s) were added to refs/heads/master by this push:
     new 6a852b2b8 fix: fix e2e unstable (#2684)
6a852b2b8 is described below

commit 6a852b2b8d6fdd7b78e87f782473f7363a3b5c55
Author: liutianyou <[email protected]>
AuthorDate: Sun Sep 8 16:54:08 2024 +0800

    fix: fix e2e unstable (#2684)
    
    Co-authored-by: aias00 <[email protected]>
    Co-authored-by: shown <[email protected]>
---
 e2e/docker-compose.yml | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/e2e/docker-compose.yml b/e2e/docker-compose.yml
index 5a000e140..94c00f54e 100644
--- a/e2e/docker-compose.yml
+++ b/e2e/docker-compose.yml
@@ -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
@@ -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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to