Hi, I try to do unit test with miniredis v2 library, but it doesn't work. #216
-
I am trying to perform unit tests using the miniredis (https://github.com/alicebob/miniredis) library. During the unit tests, a panic occurs related to the MGet operation, stating "multi key command with different key slots are not allowed". Upon debugging, I found out that the Redis client is operating in cluster mode. The code that causes the error is as follows: Additionally, I would like to make a suggestion. Currently, the client is created in cluster mode, and if it fails, it operates as a single client. However, this code may cause unexpected issues, such as the one I mentioned earlier where it operates in cluster mode when I want it to operate in single client mode. Therefore, I would appreciate it if the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @KwonsooPark, rueidis will send CLUSTER SLOTS commands to check if you are connecting to a cluster enabled node. If that command fails then rueidis will switch to single client . |
Beta Was this translation helpful? Give feedback.
Hi @KwonsooPark,
rueidis will send CLUSTER SLOTS commands to check if you are connecting to a cluster enabled node. If that command fails then rueidis will switch to single client .