-
-
Notifications
You must be signed in to change notification settings - Fork 347
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
strange issue with throws block #36
Comments
Let me check what is wrong |
Can you paste an exception message with stacktrace |
well, i got that but you can run it yourself (https://github.com/stalexxx/ad-scrapper, RetryTest.kt) |
Very weird error. Not able to understand how that's possible |
Ok, now understand |
It's about how Kotlin and MockK interact regarding Boxed numbers |
As a workaround you can use
|
well, Int is some random type, doesn't matter, but thank you, my tests are green ) |
Are you sure it doesn't matter? Because what I understood Kotlin is returning Int object from Parse and then any first possible time converts it to Mocking works like chain of calls here |
Version 1.7.10 released, please check if it fixes your case and close the ticket. |
Here https://github.com/stalexxx/ad-scrapper/blob/3f38e75d806ad9b3ea99b019280728fe78cd29d0/avito/src/test/kotlin/com/stalex/avito/RetryTest.kt I firstly made test "test always bad with mockk", but it failed stangly, although it should do the same as "test always bad"(that works):
in debugger it goes until line 35, but then fails with exception on line 33
The text was updated successfully, but these errors were encountered: