Unit tests fail for MutinyEmitter with ProducerRecord #37103
Unanswered
enrico-niccoli
asked this question in
Q&A
Replies: 5 comments
-
/cc @cescoffier (mutiny), @jponge (mutiny) |
Beta Was this translation helpful? Give feedback.
0 replies
-
/cc @ozangunalp (Reactive Messaging) |
Beta Was this translation helpful? Give feedback.
0 replies
-
There are multiple problems with your test code:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
I am converting this issue into a discussion |
Beta Was this translation helpful? Give feedback.
0 replies
-
/cc @cescoffier (mutiny), @jponge (mutiny) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the bug
Hi,
I have defined a MutinyEmitter to send data to Kafka. Since I need to dynamically set the topic name and to handle possible errors, my Emitter is defined as follows:
This works as expected but executing tests defined as described in doc returns org.awaitility.core.ConditionTimeoutException: com.package.MyTestClass expected the predicate to return but it returned for input of <[]> within 10 seconds.
My test class is defined as follows:
I suspect that this behaviour could be caused by the use of MutinyEmitter<ProducerRecord<String, MyObject>> instead of MutinyEmitter<MyObject, but I don't know how to fix it.
Thanks,
Enrico
Expected behavior
The in-memory channel receives correctly the data and test pass
Actual behavior
Test failed with org.awaitility.core.ConditionTimeoutException: com.package.MyTestClass expected the predicate to return but it returned for input of <[]> within 10 seconds.
How to Reproduce?
No response
Output of
uname -a
orver
Linux asset-00287 6.2.0-36-generic #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
openjdk version "17.0.8"
Quarkus version or git rev
3.2.6.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.11.0
Additional information
No response
Beta Was this translation helpful? Give feedback.
All reactions