Open amayausky opened 9 months ago
I meet this error too.
While use redis/v9/Client's Pipeline().exec(), it finally call pipelineReadCmds() in redis/v9/osscluster.go. In this method it only skip remain command while meet non redis err, but ProcessPipelineHook() in redismock/v9/mock.go don't have this judgement. Which caused this inconsistence.
I'm attempting to test a
Pipelined
function that experiences a failure partway through execution of a set of commands. With Redis (and go-redis) the behavior seen is all commands are run, and each one returns a response. So if an error occurs partway through it does not stop execution of the other errors while returning its error with the response array. With redismock I'm seeing the execution stop after the first error.Here are some sample tests:
The
Test_RedisPipelined
test which uses an actual Redis server succeeds, while the mock one fails with: