Hi All,

with https://github.com/apache/jmeter/pull/700 we will introduce a new property, that lets us choose whether JMeter uses Oro or Java based regexes. Currently the Oro path should be handled by our test cases and I would like to extend it to the Java based one. For testing I set the property in bin/system.properties and let Gradle run the tests, but that is not optimal, as it tests places twice, that are not related to the change and will probably not be handled correctly by our coverage reports.

Some of the changed classes need (well, are implemented using) static variables to implement the feature flag. Setting those (private static/private) fields via reflection can be done, but is probably not the best style. I could put the feature flag into another class and give it a interface, so that the behaviour could be switched at runtime (test runtime that is), or add helper methods on the changed classes, that are only useful for the unit tests.

Currently I think that it would be best to add a new class which would be specific to this feature flag (regex mode) and would be added into core or jorphan. (I would transfer the regex pattern cache from JMeterUtils into such a class, too)

What do you think?

Felix

Attachment: OpenPGP_0xEA6C3728EA91C4AF.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to