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

Use existing TestScope instead of creating a new one #560

Closed

Conversation

veyndan
Copy link
Contributor

@veyndan veyndan commented Jun 6, 2023

I'm trying to see if I can elegantly remove the dependence of PagingDataDifferTest.kt on MainDispatcherRule, without just inlining the class. Keeping track of all the CoroutineScopes for each test is difficult though, so I'm trying to slightly reduce it here (i.e., use the TestScope that the SimpleDiffer is invoked from, instead of creating a new one).

Test: ./gradlew test connectedCheck

@veyndan
Copy link
Contributor Author

veyndan commented Jun 6, 2023

I managed to remove the usage of MainDispatcherRule at #562. This change is no longer required. Personally, I find this change easier to read than what was before, but if you disagree, feel free to just close this PR.

@dlam dlam requested a review from claraf3 June 6, 2023 19:27
@claraf3
Copy link
Member

claraf3 commented Jun 6, 2023

Thanks for the clean up!

@veyndan veyndan deleted the veyndan/rm-coroutineScope branch June 18, 2023 19:37
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.

2 participants