PDF Preview:
PDF Title : | Kafka Streams in Action |
---|---|
Total Page : | 282 Pages |
Author: | Bill Bejeck |
PDF Size : | 2.5 MB |
Language : | English |
Rights : | manning.com |
PDF Link : | Available |
Summary
Here on this page, we have provided the latest download link for Kafka Streams in Action PDF. Please feel free to download it on your computer/mobile. For further reference, you can go to manning.com
Kafka Streams in Action – Book
Now, you verify the main point of the test: that the expected key and value are forwarded downstream via the ProcessorContext.forward method. This portion of the test demonstrates the usefulness of a generated mock object. Using the Mockito framework, you just need to tell the mock to expect a forward call with the given key and value and verify that the test executed the code precisely in this manner. Finally, you verify that the processor cleared out the collections of ClickEvent and StockTransaction objects after forwarding them downstream.
As you can see from this test, you can isolate the class under test with a mix of generated and stubbed-out mock objects. As I stated earlier in this chapter, the bulk of the testing in your Kafka Streams API application should be unit tests on your business logic and on any individual Processor or Transformer objects. Kafka Streams itself is thoroughly tested, so you’ll want to focus your efforts on new, untested code.
You probably won’t want to wait to deploy your application to see how it interacts with a Kafka cluster. You’ll want to sanity-check your code, which will require integration testing. Let’s look at how you can locally test against a real Kafka broker.
Kafka Streams in Action PDF
Know more about our initiative
[yasr_visitor_votes size=”medium”]