Comments (7)
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.
@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.
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.
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.
@mensfeld I've made a PR here #90. I can make additional updates/add documentation if needed.
from karafka-testing.
Took me a while (sorry), let me take a look...
from karafka-testing.
Actually both will be available. Will update the docs once ready.
from karafka-testing.
Related Issues (20)
- Test event production without defining a subject HOT 3
- karafka helpers initialize `described_class`, they shouldn't HOT 8
- Restore the ability to use implicit subject in consumer specs HOT 1
- Configuration testing HOT 10
- `certs/cert_chain.pem` permissions are wrong in the gem from rubygems HOT 3
- DLQ testing in rspec unit test cases HOT 5
- Do not use `described_class` to build consumer but instead use routing topic reference
- Dependency Dashboard
- have_enqueued_job rspec matcher does not work with :karafka ActiveJob queue_adapter HOT 3
- Retire the client stubs and replace them with alternative client after WaterDrop `2.6.0` release HOT 2
- NameError: uninitialized constant WaterDrop::Producer::DummyClient HOT 4
- Add support for client commit_offsets and commit_offsets! stubs
- Headers are not accumulated in the bufferred rspec tracker HOT 1
- Expand dummy client API with `#seek`
- karafka-testing 2.1.2 "consumer_for" helper, passed consumer_group not working. HOT 1
- Expand dummy api with `#used?`
- Make sure dummy producer supports transactions HOT 1
- Support for testing around pattern matching in topic to consumer mapping HOT 3
- Consumer variable error
- Setup internal repo to run specs against this repo
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from karafka-testing.