Skip to content

kotlinx.coroutines.test compatibility #185

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

Closed
sergeych opened this issue Feb 8, 2022 · 2 comments
Closed

kotlinx.coroutines.test compatibility #185

sergeych opened this issue Feb 8, 2022 · 2 comments

Comments

@sergeych
Copy link

sergeych commented Feb 8, 2022

New kotlinx.coroutines.test provides smart and convenientrunTest {} implementation, that provides sort of vurtual time, "eating" delay() calls and advancing "system" time accordingly, also providing advanceTimeBy(duration) convenienct method.

Clock.System.Now() as for now is not compatible with it so testing anything that uses kotlinx.datetime provides severe and hard to understand test-time bugs.

@dkhalanskyjb
Copy link
Collaborator

There's already a PR that would solve this that we're not sure about: #164

Do you maybe have some use cases not listed in #164 (comment)?

@sergeych
Copy link
Author

I'll try it, thank you.

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

No branches or pull requests

2 participants