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
Mocked function not called? #812
Comments
Since you are using Just wondering, does it work if you use the |
Thanks for your suggestion, @Raibaz ! I've tried your approach, but it doesn't work either. In the process of trying, I discovered that the issue is actually only in version But, to summarize: your approach does work in versions where the |
Excellent. I'll update when the release is out. |
Just released v1.12.4, closing this. |
Prerequisites
Expected Behavior
Test succeeds
Current Behavior
Test fails
Failure Information (for bugs)
My test fails because the mocked function is never called:
Steps to Reproduce
I have the following test:
It succeeds when running with Mockk
1.10.6
up and including1.12.2
. But it fails when running with Mockk1.12.3
. I can't figure out what change might have caused this.Context
I suppose it's not needed to know the rest of my implementation.
resourceService
is a service that does some database updates and is mocked in this test.publishKafkaMessage
is a helper function that publishes a message to Kafka. This is an integration test and we use testContainers to spin up a "real" Kafka cluster. The code under test here is listening for events from Kafka, and will be triggered by the messages that are published by this helper function.1.12.3
. (I've verified that this occurs in1.12.3
and NOT in1.10.6
,1.11.0
,1.12.0
,1.12.1
and1.12.2
.)1.5.31
openjdk 14.0.2 2020-07-14
JUnitKotest version:4.6.4
Failure Logs
Stack trace
N/A, the test fails as if the mocked function was not called.
Minimal reproducible code (the gist of this issue)
The text was updated successfully, but these errors were encountered: