You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by bu...@apache.org on 2007/10/24 21:04:09 UTC

DO NOT REPLY [Bug 43694] New: - ForEach Controller (empty collection processing error)

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43694>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43694

           Summary: ForEach Controller (empty collection processing error)
           Product: JMeter
           Version: 2.3
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
        AssignedTo: jmeter-dev@jakarta.apache.org
        ReportedBy: dmitry@ardas.dp.ua


If ForEach Controller used in the cycle and input collection is empty at the
first n iterations and not empty starting from the n+1 iteration then ForEach
starts to process collections from n+1 element.

Example
Short plan description:
Thread Group
-While (several times)
--HTTP Request
---RegExp Extractor (receives collection �input�)		
--ForEach (input:out)
---HTTP Request using out value

First iteration: input is empty
Second iteration: input {element1, element2, element3}
For each will process started from element2.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 43694] - ForEach Controller (empty collection processing error)

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43694>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43694





------- Additional Comments From dmitry@ardas.dp.ua  2007-10-24 12:18 -------

(In reply to comment #0)
> If ForEach Controller used in the cycle and input collection is empty at the
> first n iterations and not empty starting from the n+1 iteration then ForEach
> starts to process collections from n+1 element.
> 
> Example
> Short plan description:
> Thread Group
> -While (several times)
> --HTTP Request
> ---RegExp Extractor (receives collection �input�)		
> --ForEach (input:out)
> ---HTTP Request using out value
> 
> First iteration: input is empty
> Second iteration: input {element1, element2, element3}
> For each will process started from element2.

Seems the problem in the org.apache.jmeter.control.ForeachController.next() method. 

As I understand, It should reset loop counter if collection is empty.

 public Sampler next() {
	if (emptyList()) {
		reInitialize();
+		resetLoopCount();
		return null;
	}
	return super.next();
 }



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


DO NOT REPLY [Bug 43694] - ForEach Controller (empty collection processing error)

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43694>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43694


sebb@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From sebb@apache.org  2007-10-24 17:36 -------
Thanks very much for the report and the patch.

I can confirm the problem, and the patch fixes it - good work.

Applied to SVN in r588094

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org