jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Strange behaviour with JSR223Sampler GUI
Date Wed, 07 Nov 2012 01:48:04 GMT
I've been noticing some odd behaviour with the JSR223Sampler since the
cache key was added.

Sometimes the cache key field on the GUI allows null, whereas it
should always appear like the Parameters field (null not allowed).

Also the log file shows

WARN - jmeter.testbeans.gui.GenericTestBeanCustomizer:
org.apache.jmeter.util.JSR223TestElement#cacheKey does not appear to
have been configured

I thought I'd fixed that by moving the property creation earlier, but
it still occurs.

Another symptom of the problem is that the cache key field should
appear last on the GUI, however it appears first.
This is because the group order defaults to 0 if it cannot be found.

Ideally the cache key would appear closer to the script panel (as it
is closely related).
So I have moved the group setup to the super-class, and made it
optional, depending on the beanClass.

This also fixed the GUI issues and the warning no longer appears.

I'm not sure why calling createPropertyGroup from a class and one of
its subclasses causes problems, but it does.

Possibly a threading issue?
I noticed that java.beans.FeatureDescriptor which is the superclass of
java.beans.PropertyDescriptor uses HashTable (synchronised) but fails
to ensure safe publication of variables.
AFAICT it's possible for a second thread to overwrite the HashTable
created by the first, and there are various other
non-sync/non-volatile mutable variables.

However if it is a threading issue I'm not yet sure why it matters
which class the methods are called from.

For the moment, it's important that createPropertyGroup is only ever
called from one class in a hierarchy.
This is currently the case.

Mime
View raw message