I want to delete the data in redis
before taking the sample so I put the code in Beanshell Preprocessor. But the code is not running,just like the Beanshell can not recognize the Set ,part of my code is below:
import redis.clients.jedis.Jedis;
import java.util.Set;
String new_pattern = "*WITHDRAW_RISK_CONTROL_*";
Set<String> keysSet = null;
System.out.println("here****************");
and Set<String> keySet =null
is not working.I have imported Set import java.util.Set;
Is this Jmeter problem? or any reason?
The second question is :it can recognize the class Jedis
in Jedis jar.But it can not support Jedis JedisPoolConfig ,why?
Beanshell does not support Generics.
You should use instead JSR223PreProcessor + Groovy instead:
Note that there is a Redis DataSet if that's your request:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With