jedis-mock icon indicating copy to clipboard operation
jedis-mock copied to clipboard

Support for keyspace notifications

Open moaxcp opened this issue 2 years ago • 5 comments

Hello. jedis-mock is awesome! I'm just starting with testing an application and I am stuck. Right now i'm testing an application that subscribes to notifications when data is added/removed from redis. I used an interceptor to log each command and I do see a psubscribe message from the application but there are no messages when I delete data. Is this supported? I looked at the list of supported operations and I don't see notifications listed.

moaxcp avatar Jan 11 '24 15:01 moaxcp

Hey @moaxcp unfortunately keyspace notifications are not supported yet, and you are the first person who asked for this feature. To be implemented :-)

inponomarev avatar Jan 20 '24 02:01 inponomarev

Oof thanks for checking. I am still looking into using a docker container just for these tests. How would this feature be implemented?

moaxcp avatar Jan 24 '24 17:01 moaxcp

Well frankly speaking, as it's a complex feature, I'd rather avoid giving you any time estimations. So if you really need to test keyspace notifications here and now, use TestContainers.

On the other hand, as practice shows, all the requested features are implemented here sooner or later. Even Lua support and streams were implemented ) But please understand that this is a volunteer project and I am doing this in my spare time or when I have students willing to implement a feature under my supervision.

inponomarev avatar Jan 29 '24 23:01 inponomarev

Oh sorry I wasn't trying to push to get it done. I was wondering where to start.

moaxcp avatar Jan 30 '24 23:01 moaxcp