Giter Club home page Giter Club logo

Comments (8)

jrmhaig avatar jrmhaig commented on July 20, 2024

And I see that the README has 'The current implementation is tested against Redis 4' so there is no reason at all why Streams should be available yet. I'd still be interested to know, though. :-)

from mock_redis.

sds avatar sds commented on July 20, 2024

We have no explicit plans to support streams. Would happily merge a pull request adding support, however. 😄

from mock_redis.

jrmhaig avatar jrmhaig commented on July 20, 2024

Thanks. I'm not promising anything but I have started looking at implementing this here: https://github.com/jrmhaig/mock_redis

One slight problem I have is that the ids assigned to the stream items are based on the current time in milliseconds and this means that one of my tests occasionally fails because the id created by the real Redis server differs from the one created by MockRedis by one millisecond. Is there a way to make the comparison done by RSpec a little less strict?

Also, before I go too far down this route do you have any comments regarding naming conventions or anything else?

from mock_redis.

sds avatar sds commented on July 20, 2024

Rather than test that the ID matches the timestamp, would it make sense to instead test that the ID is always monotonically increasing?

Otherwise you'll necessarily have to construct the test to give yourself some wiggle room for checking the ID.

from mock_redis.

jrmhaig avatar jrmhaig commented on July 20, 2024

The problem isn't with the test itself but rather with the comparison that is done before with the real Redis server.

from mock_redis.

sds avatar sds commented on July 20, 2024

In that case I unfortunately don't have a good workaround to suggest.

from mock_redis.

sds avatar sds commented on July 20, 2024

Thanks for your work on this in #142 and #156, @jrmhaig.

from mock_redis.

sds avatar sds commented on July 20, 2024

Going to close this issue since a decent chunk of work was implemented. Thank you @jrmhaig!

If anyone wants to see additional support, pull requests are very much welcome!

from mock_redis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.