On 28 May 2012 10:28, Jan <janpaulett...@gmail.com> wrote:
> I have a requirement to use a resource pool to provide each Sampler instance
> with a resource to be used during the call to sample(Entry e).
>
> When the resource pool is initiated and performs a few one-off actions and
> then supplies pool objects based on its configuration.
>
> I don't want to keep initiating the one-off actions performed by the pool,
> as then they are no longer one-off actions, plus I wouldn't be testing just
> the action performed on the pool object but the set up of the dependent
> resources.
>
> This resource pool instance tidies up after itself when is goes out of
> scope, however it never seems goes out of scope unless I tidy up in the
> sample(Entry e) of the Sampler, but as stated above, that would mean
> recreating the pool each sample call and then tidying it up.
>
> Creating the sampler was relatively straight forward, but I can't see
> how to initialise a test run specific reference and tidy up after I'm
> done with the test run.
>
> I had a look at the SetupThreadGroup, but it's not really what I need.
>

Have a look at the TestListener interface methods.

Also look at JDBC Config, which I think has similar requirements.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org

Reply via email to