Bug 60269 - JSR 223 automatic compilation cache key not unique - same for all JSR 223s in the script
Summary: JSR 223 automatic compilation cache key not unique - same for all JSR 223s in...
Status: RESOLVED DUPLICATE of bug 59964
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 3.0
Hardware: All All
: P2 major (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-18 16:23 UTC by JJ Welch
Modified: 2016-10-18 19:49 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description JJ Welch 2016-10-18 16:23:08 UTC
Given: I have 2 or more JSR 223 elements in my script, each with unique code (Groovy in my case). I then enable the checkbox "Cache compiled script if available". 

Expected: each JSR 223 will be independent of the others. 

Acutal: Turning on/off that feature makes changes to ALL the JSR 223 elements in the script and each key is set to the same value in the JMX.

This produces weird behaviors because the elements are compiled with the same cache key and treated as the same. Also, you cannot turn on/off that feature on 1 element without it affecting all the other JSR 223 elements in the script.
Comment 1 Philippe Mouawad 2016-10-18 18:36:52 UTC

*** This bug has been marked as a duplicate of bug 59964 ***
Comment 2 Philippe Mouawad 2016-10-18 18:37:27 UTC
Hello,
I think this bug is a duplicate of Bug 59964.

Could you download nightly build and check to see if it's fixed for you ?
Thank you
Comment 3 JJ Welch 2016-10-18 19:39:40 UTC
Just checked r1765467

If I disable the checkbox and look at the raw jmx, the cacheKey is still populated with a GUID. That makes me wonder how the does JMeter know to compile or not compile that JSR 223. This is using an existing script.

If I make a new script and insert 2 http sampler, and 2 jsr 223 samplers the behavior is different.

Enable compilation on the first JSR 223. Looking at the jmx reveals that one has a cacheKey and the 2nd does not. Looking at the gui the first is checked and the 2nd is not. This behavior matches expectations.

Reverse it to 1st disabled, and 2nd enabled, works as expected. 1st has no cacheKey and the 2nd does.

Enabling both also works as expected. Each JSR 223 element has a unique cacheKey.

Now I must investigate why my old script does not work as expected.
Comment 4 Philippe Mouawad 2016-10-18 19:44:21 UTC
Hi,
Thanks for feedback.
Could you attach the "broken" script ?
Thanks
Comment 5 JJ Welch 2016-10-18 19:46:42 UTC
Just rechecking the "broken" script and it works fine too. So I would call this bug and the original report resolved.
Comment 6 Philippe Mouawad 2016-10-18 19:49:05 UTC
(In reply to JJ Welch from comment #5)
> Just rechecking the "broken" script and it works fine too. So I would call
> this bug and the original report resolved.

Good. Thanks for your checks.