Skip to content
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

Prepare tests for kotlinx-coroutines-test #46

Merged
merged 7 commits into from
Feb 19, 2022

Conversation

ankushg
Copy link
Contributor

@ankushg ankushg commented Feb 17, 2022

Necessary to support test cases on the JS Target

Tests are failing on Kotlin/Native platforms.

Currently blocked by Kotlin/kotlinx.coroutines#3195

@ankushg ankushg mentioned this pull request Feb 17, 2022
26 tasks
@rickclephas
Copy link
Owner

Let's see what happens with the kotlinx.coroutines issue. If it can't be fixed we can always create an expect/actual for runTest that uses runBlocking on native (at least until the old memory model with the freezing is dropped 😁)

@rickclephas rickclephas changed the title [WIP] Migrate from runBlocking to kotlinx-coroutines-test Prepare tests for kotlinx-coroutines-test Feb 19, 2022
@rickclephas
Copy link
Owner

Alright I have added a kind of hacky workaround for the freezing issue. The test are now using expect functions that are currently mapped to runBlocking in appleTest in jsTest these should be mapped to the kotlinx-coroutines-test functions.

I guess the two delays that are still in there should be replaced with a call to runCurrent as well on JS.
If that is the case then we need to add another expect function 😅.

Anyway this shouldn't be a problem for long since the whole freezing thing will be gone once the old native memory model is dropped 😁.

@rickclephas rickclephas marked this pull request as ready for review February 19, 2022 15:46
@rickclephas rickclephas merged commit c6b134a into rickclephas:master Feb 19, 2022
@ankushg ankushg deleted the feat/kotlinx-coroutines-test branch February 22, 2022 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants