-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Making Test(Coroutine)Scope sealed
breaks my entire test suite
#3070
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
Comments
sealed
breaks my entire test suite
The reason is that
We couldn't think of any use cases for someone inheriting from As for what can be done on your side, please see the migration guide: https://github.com/Kotlin/kotlinx.coroutines/blob/master/kotlinx-coroutines-test/MIGRATION.md#testcoroutinescope In essence, if you use Does this work for you? |
I have the following "scope" interface for all my integration tests (and similar in other kinds of tests):
That is to keep
TestCoroutineScope
functionality in scope while also adding custom functionality.In 1.6.0-RC that doesn't compile anymore.
Same with the new
TestScope
.What's the reason to make the old one suddenly
sealed
?That's a source-breaking change. And it's not listed as a breaking change in the release notes.
The code of
TestCoroutineScope
has this@Deprecated
comment:Unfortunately it's already an error in 1.6.0 due to
sealed
.What's the suggested path forward?
The text was updated successfully, but these errors were encountered: