Skip to content

Update kotlinx-coroutines-test #2973

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

Merged
merged 22 commits into from
Nov 19, 2021
Merged

Conversation

dkhalanskyjb
Copy link
Collaborator

@dkhalanskyjb dkhalanskyjb commented Oct 11, 2021

Fixes #1203
Fixes #1609 (I think)
Fixes #2379
Fixes #1749
Fixes #1204
Fixes #1390
Fixes #1222
Fixes #1395
Fixes #1881
Fixes #1910
Fixes #1772
Fixes #1626
Fixes #1742
Fixes #2082
Fixes #2102
Fixes #2405
Fixes #2462

@dkhalanskyjb dkhalanskyjb requested a review from qwwdfsad October 11, 2021 15:58
@dkhalanskyjb dkhalanskyjb force-pushed the coroutines-test-virtualtime branch 2 times, most recently from 15788a3 to 25a7fe0 Compare October 15, 2021 10:10
@dkhalanskyjb dkhalanskyjb requested a review from qwwdfsad October 25, 2021 09:21
@dkhalanskyjb dkhalanskyjb force-pushed the coroutines-test-virtualtime branch from e2e2d10 to 2f818a3 Compare October 25, 2021 12:22
@dkhalanskyjb dkhalanskyjb force-pushed the coroutines-test-virtualtime branch from 67661d9 to 5509e90 Compare October 27, 2021 07:59
@dkhalanskyjb dkhalanskyjb requested a review from qwwdfsad October 27, 2021 11:34
@dkhalanskyjb dkhalanskyjb changed the title Implement a scheduler for test coroutine dispatchers Update kotlinx-coroutines-test Nov 16, 2021
@dkhalanskyjb dkhalanskyjb force-pushed the coroutines-test-virtualtime branch from 35037ce to e4a5f6d Compare November 17, 2021 08:10
@dkhalanskyjb
Copy link
Collaborator Author

Since the last PR, I've rebased the changes and added 1a8af52.

@dkhalanskyjb dkhalanskyjb force-pushed the coroutines-test-virtualtime branch from e4a5f6d to ae82754 Compare November 17, 2021 15:59
Copy link
Collaborator

@qwwdfsad qwwdfsad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tremendeous and terrific work 🔥

Please wait until #3034 is merged, rebase on the recent develop and ensure that the build is green (I expect everything to work smoothly now), and then it's good to go!

dkhalanskyjb and others added 11 commits November 19, 2021 18:07
Implement a multiplatform runTest as an initial implementation of #1996.

Fixes #1204
Fixes #1222
Fixes #1395
Fixes #1881
Fixes #1910
Fixes #1772
Defines two test dispatchers:
* StandardTestDispatcher, which, combined with runTest,
  gives an illusion of an event loop;
* UnconfinedTestDispatcher, which is like
  Dispatchers.Unconfined, but skips delays.

By default, StandardTestDispatcher is used due to the somewhat
chaotic execution order of Dispatchers.Unconfined.
TestCoroutineDispatcher is deprecated.

Fixes #1626
Fixes #1742
Fixes #2082
Fixes #2102
Fixes #2405
Fixes #2462
Also, fix `Dispatchers.Main` not delegating `Delay` methods and
discover that, on JS, `Dispatchers.Main` gets reset during the test
if it is reset in `AfterTest`.
Co-authored-by: Vsevolod Tolstopyatov <[email protected]>
@dkhalanskyjb dkhalanskyjb force-pushed the coroutines-test-virtualtime branch from 97d0f47 to 0ffeb0e Compare November 19, 2021 15:08
@dkhalanskyjb dkhalanskyjb merged commit 2e25bae into develop Nov 19, 2021
@dkhalanskyjb dkhalanskyjb deleted the coroutines-test-virtualtime branch November 19, 2021 18:02
yorickhenning pushed a commit to yorickhenning/kotlinx.coroutines that referenced this pull request Jan 28, 2022
This commit introduces the new version of the test module.
Please see README.md and MIGRATION.md for a thorough
discussion of the changes.

Fixes Kotlin#1203
Fixes Kotlin#1609
Fixes Kotlin#2379
Fixes Kotlin#1749
Fixes Kotlin#1204
Fixes Kotlin#1390
Fixes Kotlin#1222
Fixes Kotlin#1395
Fixes Kotlin#1881
Fixes Kotlin#1910
Fixes Kotlin#1772
Fixes Kotlin#1626
Fixes Kotlin#1742
Fixes Kotlin#2082
Fixes Kotlin#2102
Fixes Kotlin#2405
Fixes Kotlin#2462

Co-authored-by: Vsevolod Tolstopyatov <[email protected]>
@radityagumay
Copy link

how do we know which version that will contains this fix?

pablobaxter pushed a commit to pablobaxter/kotlinx.coroutines that referenced this pull request Sep 14, 2022
This commit introduces the new version of the test module.
Please see README.md and MIGRATION.md for a thorough
discussion of the changes.

Fixes Kotlin#1203
Fixes Kotlin#1609
Fixes Kotlin#2379
Fixes Kotlin#1749
Fixes Kotlin#1204
Fixes Kotlin#1390
Fixes Kotlin#1222
Fixes Kotlin#1395
Fixes Kotlin#1881
Fixes Kotlin#1910
Fixes Kotlin#1772
Fixes Kotlin#1626
Fixes Kotlin#1742
Fixes Kotlin#2082
Fixes Kotlin#2102
Fixes Kotlin#2405
Fixes Kotlin#2462

Co-authored-by: Vsevolod Tolstopyatov <[email protected]>
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.

3 participants