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

Update kotlinx-coroutines-test #2973

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 force-pushed the coroutines-test-virtualtime branch 2 times, most recently from 15788a3 to 25a7fe0 Compare October 15, 2021 10:10
kotlinx-coroutines-test/common/src/TestCoroutineScope.kt Outdated Show resolved Hide resolved
kotlinx-coroutines-test/common/src/TestCoroutineScope.kt Outdated Show resolved Hide resolved
kotlinx-coroutines-test/common/src/TestDispatcher.kt Outdated Show resolved Hide resolved
kotlinx-coroutines-test/common/src/TestDispatcher.kt Outdated Show resolved Hide resolved
@dkhalanskyjb dkhalanskyjb changed the title Implement a scheduler for test coroutine dispatchers Update kotlinx-coroutines-test Nov 16, 2021
@dkhalanskyjb
Copy link
Collaborator Author

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

Copy link
Member

@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 <qwwdfsad@gmail.com>
@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 <qwwdfsad@gmail.com>
@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 <qwwdfsad@gmail.com>
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

3 participants