smicyk / groovy-jmeter

A Groovy-based DSL for building and running JMeter test plans from command line and more.
Apache License 2.0
13 stars 1 forks source link

code caching issue #129

Closed AntonioSun closed 5 months ago

AntonioSun commented 6 months ago

Hi @smicyk

Please take a look at these two lines,

https://github.com/AntonioSun/gjs-xrpl/blob/10219373d6660ee71e466ff2b58d7839bb9bbd32/book_offers/book_offers_ctrl.groovy#L45-L46

I found that flipping the two lines will get me exactly same output, even though the underlying code are a bit different (the InfluxDb Backend being enabled or not). There are more caching issues, if you checkout the code history step by step, but this one is the easiest to duplicate, for me.

Are you getting the same result as well? thx

AntonioSun commented 5 months ago

Trying to see how groovy open its files myself, but even with strace -f that traces the forked processes, I'm still unable to see any of my files opened in the log...

smicyk commented 5 months ago

I run your scripts. I think the same result come from the fact that all files paths are resolved according to script folder. So in your case executing code in book_offers (path relative to repository root folder):

insert common/stationary-end.groovy -> /book_offers/../common/stationary-end.groovy -> /common/stationary-end.groovy
then inside /common/stationary-end.groovy you call
insert fragments/backend.groovy -> /boot_offers/../demo_reuse/fragments/backend.groovy -> /demo_resuse/frgments/backend.groovy

When you use other line:

insert fragments/stationary-end.groovy -> /book_offers/../demo_reuse/fragments/stationary-end.groovy -> /demo_reuse/fragments/stationary-end.groovy then
insert fragments/backend.groovy -> /boot_offers/../demo_reuse/fragments/backend.groovy -> /demo_resuse/frgments/backend.groovy

I hope that helps.

AntonioSun commented 5 months ago

Ahh~~, sorry for my silly mistake -- it becomes very obvious after your clear explanation. Thanks!