Git Product home page Git Product logo

Comments (7)

mensfeld avatar mensfeld commented on June 8, 2024 1

It is. It would be good to have a way to buffer this data instead of just ignoring it in test env. Would be happy to see your code and then we can polish it into a feature. Thanks!

from karafka-testing.

mensfeld avatar mensfeld commented on June 8, 2024 1

@Cameron2920 I took your code and in the upcoming days (I have a cold so around weekend) will ship your changes alongside mine. Karafka.producer messages will now target both consumer and buffer, meaning we can ditch the karafka.publish and can just send messages and the once that will target given consumer will reach it.

Thank you for your code.

from karafka-testing.

mensfeld avatar mensfeld commented on June 8, 2024

Aside from stubbing, there is no method.

We could use a new test low-level client like the dummy one: https://github.com/karafka/waterdrop/blob/master/lib/waterdrop/producer/dummy_client.rb and use it with Karafka-Testing to accumulate messages.

I will make it into a card but cannot promise the ETA.

from karafka-testing.

Cameron2920 avatar Cameron2920 commented on June 8, 2024

Thanks for the reply!

For now, I'll implement a mock producer that stores events in memory and exposes methods to view the stored events.

If this is something you think would be useful for this gem, I can make a PR when I'm finished.

from karafka-testing.

Cameron2920 avatar Cameron2920 commented on June 8, 2024

@mensfeld I've made a PR here #90. I can make additional updates/add documentation if needed.

from karafka-testing.

mensfeld avatar mensfeld commented on June 8, 2024

Took me a while (sorry), let me take a look...

from karafka-testing.

mensfeld avatar mensfeld commented on June 8, 2024

Actually both will be available. Will update the docs once ready.

from karafka-testing.

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.