https://kotlinlang.org logo
e

EvaS

03/17/2020, 10:43 AM
Hello, I updated Kotlin to 1.3.70 and so the depencies (ktor, coroutine, serialization). Now the tests are runned on iOSX64 and surprise ! They don't compile I added some dependencies for ios test :
Copy code
kotlin_test_junit     : "org.jetbrains.kotlin:kotlin-test-junit:$ver.kotlin",
kotlin_test           : "org.jetbrains.kotlin:kotlin-test:$ver.kotlin",
ktor_client_mock: "io.ktor:ktor-client-mock-native:$ver.ktor",
kotlin_couroutine_test: "org.jetbrains.kotlinx:kotlinx-coroutines-test:$ver.kotlinx_coroutine"
Now it compiles but some tests fail. I guess it's because my coroutine's dep is wrong (or ktor, I don't know). I have a big trace
at io.ktor.client
and
at kotlinx.coroutines
Any hint ?
c

cy

03/17/2020, 10:45 AM
Any info? What erros?
e

EvaS

03/17/2020, 10:45 AM
For instance
The test is
blocking
and call a
suspend
function
I'm using :
Copy code
kotlin               : '1.3.70',
kotlinx_serialization: '0.20.0',
kotlinx_coroutine    : '1.3.4',
ktor                 : '1.3.2',
c

cy

03/17/2020, 10:52 AM
Versions seems fine, looks like some behaviour has changed. Sorry, the stacktrace is completely useless: no information about what exact doesn’t work.
e

EvaS

03/17/2020, 10:52 AM
Yep I know 😄
I have a class that doesn't use Coroutines at all and the tests pass for this class
All my "suspend test" fail
And the tests testing methods that actually launches the coroutine doesn't success nor fail
They just keep running with some useless error
It might be the
actual implementation
I have an error on
import platform.Foundation.*
(
platform
in red). Since it compiles I think it's an IDE's error. But can't be sure...
same thing for
import kotlinx.coroutines.runBlocking
That was it... Wrong
actual implementation
Sorry for the mess -.-
3 Views