You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ke...@apache.org on 2025/10/18 00:34:21 UTC

(skywalking-infra-e2e) branch main updated: [BUG] Fix the e2e test ​​being blocked​​ by the cleanup step when the verify step takes longer than the trigger step (#133)

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

kezhenxu94 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-infra-e2e.git


The following commit(s) were added to refs/heads/main by this push:
     new 04c668d  [BUG] Fix the e2e test ​​being blocked​​ by the cleanup step when the verify step takes longer than the trigger step (#133)
04c668d is described below

commit 04c668d691073276fb808f4d1cc7c052d8f2327f
Author: youjie23 <yo...@gmail.com>
AuthorDate: Sat Oct 18 08:34:16 2025 +0800

    [BUG] Fix the e2e test ​​being blocked​​ by the cleanup step when the verify step takes longer than the trigger step (#133)
---
 internal/components/trigger/http.go | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/internal/components/trigger/http.go b/internal/components/trigger/http.go
index 354e4cb..1bec933 100644
--- a/internal/components/trigger/http.go
+++ b/internal/components/trigger/http.go
@@ -62,7 +62,7 @@ func NewHTTPAction(intervalStr string, times int, url, method, body string, head
 		body:          body,
 		headers:       headers,
 		executedCount: 0,
-		stopCh:        make(chan struct{}),
+		stopCh:        make(chan struct{}, 1),
 		client:        &http.Client{},
 	}, nil
 }
@@ -75,6 +75,7 @@ func (h *httpAction) Do() chan error {
 	result := make(chan error)
 	sent := false
 	go func() {
+		defer t.Stop()
 		for {
 			select {
 			case <-t.C:
@@ -87,12 +88,9 @@ func (h *httpAction) Do() chan error {
 					sent = true
 				}
 				if h.times == h.executedCount {
-					t.Stop()
 					return
 				}
 			case <-h.stopCh:
-				t.Stop()
-				result <- nil
 				return
 			}
 		}