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

Create Test Rule or similar for better management of TestApp lifecycle #1496

Open
cmelchior opened this issue Aug 31, 2023 · 0 comments
Open

Comments

@cmelchior
Copy link
Contributor

cmelchior commented Aug 31, 2023

In all our integration tests we set up a TestApp for testing App Services functionality. If this test app is not torn down, it will leak dispatchers, which can potentially disrupt other tests.

Currently, we have a TestApp().use { } pattern, but it is annoying code to have littered around in all our tests. It would be much better if we could create something like a JUnit test rule that would automatically clean up.

It would also be nice if such a rule could automatically discover the method being tested since we are manually injecting this ID.

Unfortunately, neither seems to be supported in the Kotlin test framework. So this issue is finding an improvement to the current situation.

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

1 participant