On stream restart, the mock stops working
See original GitHub issueI got the following set-up:
Producer actor -> Akka stream -> alpakka-amqp -> Consumer akka stream
When I restart either stream (which implies draining the stream, canceling upstream and completing downstream, and then creating a new stream with the same AmqpConnectionProvider
and configs), the mock stops working with the new stream.
Using messageCount
and consumerCount
on the used channel shows the correct number of messages waiting to be read and the new consumer in there (for example, starts at one, goes to 0 when the stream is shutdown and back to 1 when it is recreated), but nothing is delivered to the stream.
Using the same set-up on a real RMQ server instead of the mock seems to be working. Any idea?
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Mock a method that returns a Stream and is called more than ...
Show activity on this post. Try the thenAnswer instead of thenReturn : Answer<Stream> answer = new Answer<Stream>() { public Stream answer( ...
Read more >Some mocking tricks with jest - Ben Smithgall
When working with streams (most specifically something like fs.createWriteStream or @google-cloud/storage ), it's nice to have a real stream ...
Read more >Returning stubbed HTTP responses to specific requests
Reset. The WireMock server can be reset at any time, removing all stub mappings and deleting the request log. If you're using either...
Read more >Testing Kafka Streams
To test a Kafka Streams application, Kafka provides a test-utils artifact that ... Windowed, or Session), since the mock context does not manage...
Read more >Testing Streams Code - Confluent Documentation
Streams provides MockProcessorContext in kafka-streams-test-utils for this purpose. To begin with, instantiate your processor and initialize it with the mock ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ledoyen Thanks for the update! Preliminary testing looks promising and seems to show that our issues have been fixed. I’ll be running tests over the week to confirm and ensure there are no further issues. Thanks!
@mdiasribeiro It should be working fine now, thanks again for providing a test about this issue.
Check-out version 1.0.12 and let me know !