jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erez Naim <E...@theneura.com>
Subject Java code
Date Mon, 30 Nov 2015 14:39:32 GMT
Hi all,

I am using this piece of code under BeanShell Sampler:

import redis.clients.jedis.Jedis;

      //Connecting to Redis server on localhost
     Jedis jedis = new Jedis("54.214.48.139");
                System.out.println("Connection to server sucessfully");
                                //System.out.println("Server is running: "+jedis.ping());
                int jedisSize = jedis.llen("sidekiq:queue:channles");
                System.out.println("Server is full: " + jedisSize);

int size = vars.get("jedisSize");


I am trying to use "size" in while loop
So I can use the following condition:

${__javaScript("${jedisSize}"  !=  0 in the while loop...

Any help of how to do it will be great !

--Erez--

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message