-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update document for testing kafka without broker #35051
Conversation
Thanks for your pull request! The title of your pull request does not follow our editorial rules. Could you have a look?
This message is automatically generated by a bot. |
🙈 The PR is closed and the preview is expired. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking the time to contribute!
I added a few small comments about the form.
I will let @ozangunalp review the content.
docs/src/main/asciidoc/kafka.adoc
Outdated
<5> Use the `received` method on `beverages` channel to check the messages produced by the application. | ||
<5> Use the `received` method on `beverages` channel to check the messages produced by the application. The `await` is imported from https://github.com/awaitility/awaitility[awaitility]. | ||
|
||
If your Kafka consumer is batch based, you will need to send a batch of messages to the channel as per discussed in this https://github.com/smallrye/smallrye-reactive-messaging/discussions/1691#discussioncomment-2471033[Github Discussion]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should link to a discussion. Our doc should be authoritative.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
docs/src/main/asciidoc/kafka.adoc
Outdated
@@ -2052,7 +2053,75 @@ class BaristaTest { | |||
<3> Retrieve the outgoing channel (`beverages`) - the channel must have been switched to in-memory in the test resource. | |||
<4> Use the `send` method to send a message to the `orders` channel. | |||
The application will process this message and send a message to `beverages` channel. | |||
<5> Use the `received` method on `beverages` channel to check the messages produced by the application. | |||
<5> Use the `received` method on `beverages` channel to check the messages produced by the application. The `await` is imported from https://github.com/awaitility/awaitility[awaitility]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add the imports to the examples instead. That's what we try to do elsewhere as it can be hard to get it right if you don't have the imports.
Note that this is orthogonal to your PR but maybe you could take care of it in a separate commit, instead of adding this sentence?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
thanks @gsmet for the review. i will update it accordingly but later - i am currently on something else. |
Hi @gsmet and @ozangunalp, it has been a while since the last time the pr got reviewed, any chance you can have a look on it when you got a chance? Thanks! |
6a845a3
to
12690df
Compare
I rebased and squashed. @ozangunalp could you have a look, please? It looks like a worthy addition. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good addition indeed! The test case needs some tweaking but it'll be nice to add it in the Kafka docs.
docs/src/main/asciidoc/kafka.adoc
Outdated
public class BeverageProcessor { | ||
|
||
@Incoming("orders") | ||
@Outgoing("beverages") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The processing method doesn't return any outgoing data. You need to remove this Outgoing
annotation and the beverages sink in the test code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks
@cuichenli could you squash commits to only have one? |
6401a2a
to
2ba044d
Compare
sure, updated! |
two main changes:
@Connector("smallrye-in-memory")
annotation. otherwise it will report errorThe reproducible repository: https://github.com/cuichenli/quarkus-35051-kafka-test-without-broker
2. add test example for testing batch consumer with inmemoryconnector
one minor change:
await
is imported fromawaitability