-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Replace usage of TestDispatcher with StandardTestDispatcher in paging-compose #505
Conversation
Hey thanks for the PR. Sorry took me to some time to get to it. I think this and PR 506, 507 are failing from a metalava error that has since been fixed. Can you try rebasing? |
12abfc2
to
2cd7d4e
Compare
@claraf3 Rebased all three! |
sweet thanks! |
Im thinking we can kmp-ify |
@claraf3 Yep, could do that instead. Two things of note:
I don't feel strongly about this, so if you think it makes sense to keep using |
Ideally our tests would rely on standard kotlin-test classes but it that would touch a lot of our tests so I'll have to take a closer look at that at a later time. But in the meantime I think it makes sense to upstream your work here. Even if we replace use of custom dipatchers, its probably better in the long run to have testutil-ktx multiplatform-ready. Would appreciate it if you close out these few PRs and we have a PR with your multiplatformized classes from |
Hi @veyndan, we merged the other two PRs to start moving off of testutils-ktx. We can also merge your multiplatformized classes from |
Yep I am — just need to find some time to do it! I'd probably create a separate PR though. As one of the PRs that were merged was very similar to this one (#507), would it make sense to upstream this one too? It isn't necessary as part of maintaining Multiplatform Paging once I've created the other PR, but just if there's a desire to start using classes from |
Yep, I think we'd like to move to Although ideally we would rewrite our tests so that we can always rely on |
We're seeing some errors in CI that looks like a missing
Can you please add the correct annotations? That last line should help verify that you've caught everything. |
002b706
to
b44c4f7
Compare
@ianhanniballake Done! |
Nice, thanks @veyndan! |
Upstreaming [Multiplatform Paging's kmp-ified testutils-ktx](https://github.com/cashapp/multiplatform-paging/tree/androidx-main-3.2.0-alpha04/testutils/testutils-ktx). See #505 (comment) for more context. Test: ./gradlew test connectedCheck Bug: 270612487 This is an imported pull request from #518. Resolves #518 Github-Pr-Head-Sha: a261291 GitOrigin-RevId: 4d77f0b Change-Id: I2c3e46143ffa369aafed9bbc9da05d4b4636e6d0
In Multiplatform Paging, the classes
DirectDispatcher
andTestDispatcher
intestutils-ktx
had to be multiplatformized to allow dependent tests inpaging-compose
,paging-common
, andpaging-runtime
to be moved to the respectivecommonTest
folders.I'm attempting to replace all usages of
DirectDispatcher
andTestDispatcher
that Multiplatform Paging depends on with those found inkotlinx.coroutines.test
, so hopefully thetestutils-ktx
dependency no longer has to be multiplatformized in my fork.I'm starting this effort by doing it with
paging-compose
.Test: ./gradlew test connectedCheck
Bug: 270612487