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

Refactor Cache Internal Classes #135

Merged
merged 1 commit into from
Nov 30, 2024
Merged

Conversation

ogaclejapan
Copy link
Contributor

In #89, we introduced the Subscription API and split the Client I/F and Cache implementation into two:

  • SwrClient - SwrCache
  • SwrClientPlus - SwrCachePlus

Previously, SwrCache and SwrCachePlus had a direct inheritance relationship. This refactor extracts the internal logic and removes the inheritance.

With this change, the soil-query-testing library can now define the same extension functions for both:

val testClient1 = SwrCache(..).test()
val testClient2 = SwrCachePlus(..).test()

In #89, we introduced the Subscription API and split the Client I/F and Cache implementation into two:

* SwrClient - SwrCache
* SwrClientPlus - SwrCachePlus

Previously, SwrCache and SwrCachePlus had a direct inheritance relationship. This refactor extracts the internal logic and removes the inheritance.

With this change, the soil-query-testing library can now define the same extension functions for both:

```
val testClient1 = SwrCache(..).test()
val testClient2 = SwrCachePlus(..).test()
```
@ogaclejapan ogaclejapan force-pushed the refactor-swr-cache-internal branch from be7b3ee to c4d7ca9 Compare November 30, 2024 04:37
@ogaclejapan ogaclejapan merged commit 6a2c122 into main Nov 30, 2024
3 checks passed
@ogaclejapan ogaclejapan deleted the refactor-swr-cache-internal branch November 30, 2024 04:45
ogaclejapan added a commit that referenced this pull request Nov 30, 2024
Implemented `isIdleNow` function, which can be used with `IdlingResource` or `waitUntil`,and `awaitIdle` suspend
function for Compose UI testing, utilizing the `SwrCacheView` introduced in #135.

Previously, it was not possible to determine whether there were ongoing operations within the cache. With these new
functions, it is now possible to synchronize with Compose test functions for proper coordination during testing.
@github-actions github-actions bot mentioned this pull request Dec 7, 2024
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.

1 participant