From e7591ec8b3ba3c679390e0f1dd000ea91ea8d706 Mon Sep 17 00:00:00 2001 From: Sajad Date: Sat, 11 Jun 2022 14:29:05 +0530 Subject: [PATCH] use request numbering as per template definition in req-condition (#2135) * use original request number instead of current iteration in request-condition * add previousEvent tracking back for request condition Co-authored-by: sandeep --- v2/pkg/protocols/http/request.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/v2/pkg/protocols/http/request.go b/v2/pkg/protocols/http/request.go index b82d0053..ac9a5268 100644 --- a/v2/pkg/protocols/http/request.go +++ b/v2/pkg/protocols/http/request.go @@ -240,7 +240,6 @@ func (request *Request) ExecuteWithResults(reqURL string, dynamicValues, previou generator := request.newGenerator() var gotDynamicValues map[string][]string - requestCount := 1 var requestErr error for { // returns two values, error and skip, which skips the execution for the request instance. @@ -285,7 +284,7 @@ func (request *Request) ExecuteWithResults(reqURL string, dynamicValues, previou } else { callback(event) } - }, requestCount) + }, generator.currentIndex) // If a variable is unresolved, skip all further requests if err == errStopExecution { @@ -297,7 +296,6 @@ func (request *Request) ExecuteWithResults(reqURL string, dynamicValues, previou } requestErr = err } - requestCount++ request.options.Progress.IncrementRequests() // If this was a match, and we want to stop at first match, skip all further requests.