The semantics of the "next()" method are supposed to be like so: returns Sampler - sampler is intended to be executed.
returns null, isDone() = false: This should indicate the the controller has finished a full round of iteration, and the test should move on to the next controller. If the test runs another iteration, the controller should be ready for everything to begin again. This is why the "nextIsNull()" method calls reinitialize(). returns null, isDone() = true; The controller has finished entirely, and should not be run again. Indeed, it is generally dropped from the test entirely. If returning null and not setting isDone to true is causing a problem, that sounds like either: 1. You next() method is getting into and infinite recursive loop when called subsequently aftering returning a null. If you haven't explicitly looked into this possibility (ie written some unit tests for it) I consider this most likely. 2. JMeter has been changed in some way since I last looked at it that has introduced a bug, because this was not a problem previously. I think this is unlikely since this particular bug would be very noticeable in nearly all tests. -Mike On 19 Jan 2004 at 2:27, Jerry Pulley wrote: > I'm writing a controller that allows its contents to execute once every > time an external event happens. It performs correctly for the first > occurrence, but subsequently only allows n-1 subelements to execute. > What would cause this? > > I've overridden GenericController.next() to: initialize and return null > on first pass; check whether done; check for external event and become > "active"; if active return super.next(); if done with subelements become > inactive. > > If inactive, it returns a NullSampler, which is pretty much what it > sounds like. I found that returning null from next() and not setting > done was a recipe for call stack overflow. > > I've examined LoopController and OnlyOnceController; neither seems to > approximate what I'm attempting closely enough. Perhaps I don't fully > understand the purpose of nextIsNull()? I looked at IfController, but > that's for a continuous condition, not a one-time event. > > Thanks for any assistance. > > jp > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: jmeter-user- [EMAIL PROTECTED] > For additional commands, e-mail: jmeter-user- [EMAIL PROTECTED] > -- Michael Stover [EMAIL PROTECTED] Yahoo IM: mstover_ya ICQ: 152975688 AIM: mstover777 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

