Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bzPopMaxShouldWorkCorrectly() and bzPopMinShouldWorkCorrectly() t…
…ests in JedisClusterConnectionTests. Jedis 5.0 changed the bzpopmax and bzpopmin Redis commands to no longer return an empty (Array)List internally when evaluating and popping from an empty sorted set. A NullPointerException will be thrown if either bzpopmax or bzpopmin commands are executd on an empty Redis sorted set in Jedis 5.0 (vs. Jedis 4.x): Caused by: java.lang.NullPointerException: Cannot invoke 'java.util.List.isEmpty()' because l is null: at redis.clients.jedis.BuilderFactory7.build(BuilderFactory.java:616) This seems like a bug in Jedis. It is safe to execute zcard(key) to return the cardinality of (number of elements in) the sorted set before the test executes, ensuring a clean, reliable run. Closes #2612
- Loading branch information