(InMemoryConnector) Sink does not receive message as per Kafka docs
See original GitHub issueDescribe the bug
I’m testing reactive messaging using a Kafka connector.
I want to test with the InMemoryConnector
as provided by SmallRye, here and outlined in the related guide on the Testing without a broker section.
FYI @el10686
Expected behavior
The message should be received by the InMemorySink
.
Actual behavior
The message is not received at all.
Running the test with ./mvnw clean test -Dtest=InMemoryConnectorTest
and awaitility condition check times out with
[ERROR] org.acme.InMemoryConnectorTest.test Time elapsed: 10.696 s <<< ERROR!
org.awaitility.core.ConditionTimeoutException: Lambda expression in org.acme.InMemoryConnectorTest that uses io.smallrye.reactive.messaging.connectors.InMemorySink: expected the predicate to return <true> but it returned <false> for input of <[]> within 10 seconds.
at org.acme.InMemoryConnectorTest.test(InMemoryConnectorTest.java:36)
How to Reproduce?
Here’s a link to a reproducer:
https://github.com/chris-asl/quarkus-reactive-messaging-inmemory
I’ve included two tests:
InMemoryConnectorTest
follows the Kafka documentation code but fails, run with./mvnw clean test -Dtest=InMemoryConnectorTest
InMemoryProducerConsumerTest
uses the in memory connector (and passes) but decouples testing of the two components (Consumer, Producer), run with./mvnw clean test -Dtest=InMemoryProducerConsumerTest
Output of uname -a
or ver
Linux homer 5.8.0-59-generic #66~20.04.1-Ubuntu SMP Thu Jun 17 11:14:10 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Output of java -version
openjdk version "11.0.11" 2021-04-20 OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04) OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)
GraalVM version (if different from Java)
NA
Quarkus version or git rev
2.0.3.Final
Build tool (ie. output of mvnw --version
or gradlew --version
)
Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
Additional information
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
cc @ozangunalp
@chris-asl Yes! That would be awesome!