I think the IfController could be used to check a variable set by an
assertion, and end the iteration depending on that value.  

-Mike

On Tue, 2004-06-08 at 14:39, Chris Povirk wrote:
> On Mon, 07 Jun 2004 10:10:00 -0400
> Michael Stover wrote:
> 
> > > 
> > > if(condition)
> > > {
> > >   // do thing 1
> > >   // do thing 2
> > > }
> > > 
> > > ...to actually perform...
> > > 
> > > if(condition)
> > > {
> > >   // do thing 1
> > > }
> > > if(condition)
> > > {
> > >   // do thing 2
> > > }
> > 
> > I suspect that this second case is the desired behavior.  Many would
> > want to use the IfController to break out of the iteration on error. 
> > Your examples of how it might be undesireable are A) avoidable as you
> > say, and B) both have other controllers that more effectively achieve
> > those results (ie loop controller and throughput controller).  But, the
> > documentation should reflect the difference.
> *snip*
> > It could be a checkbox parameter that one can check to switch between
> > the two behavior types.
> 
> A documentation change would probably be sufficient.  In any case, I don't think a 
> checkbox to configure the behavior is worth it, but that may just be my personal 
> preference.  As you say, there are ways to fake the single-evaluation method, and if 
> I hadn't been experimenting with the broken 2.0.0 IfController, I probably would not 
> have used it this specific way (with Math.random()).
> 
> A question, though: Could you clarify what you mean by using IfController with the 
> current behavior "to break out of the iteration on error?"  Just a simple example or 
> something -- I don't quite understand what you mean.
> 
> Regardless, it seems to me that the null --> nextIsNull() change would be a good 
> thing....  If you do "break out" of the iteration due to an error, you'll presumably 
> want to start over the next time through.  Then again, as I said, I'm not sure I 
> understand this use of IfController.
> 
> Thanks.
> 
> --Chris
> 
> --- 
> jakarta-jmeter-2.0.0-cvs/src/core/org/apache/jmeter/control/IfController.java.orig  
> 2004-05-24 18:12:30.000000000 -0500
> +++ jakarta-jmeter-2.0.0-cvs/src/core/org/apache/jmeter/control/IfController.java    
>    2004-06-08 13:21:14.834024536 -0500
> @@ -174,7 +174,7 @@
>                         if (result)
>                                 return super.next();
>                         else
> -                               return null;
> +                               return nextIsNull();
>                                 
>           }
>  
> @@ -237,4 +237,4 @@
>                         }
>           }
>  
> -}
> \ No newline at end of file
> +}
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Michael Stover <[EMAIL PROTECTED]>
Apache Software Foundation


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to