GitHub link of same content:
https://github.com/redis/jedis/issues/3392
Copying my (first) reply:
I wonder what is in your unit tests. Could it be just limited to creating a cluster connection object? Without executing any other command?
Why I'm wondering this is because of a certain difference between Jedis 3.x and Jedis 4+ which seems to matter in your case.
In Jedis 3.x, when a JedisCluster object was being created with all cluster nodes down/unavailable, the constructor would not throw any exception and the object would be created BUT it would be a stale object with which no server operations can be done.
To address requests from users, Jedis 4.0 started throwing exceptions in such cases with message `Could not initialize cluster slots cache.`.
I hope I have been able to identify your problem properly and you have found it helpful. Thanks.