* Remove unnecessary Collections.unmodifiableMap since we already return a defensive copy. Also write test to verify we returns a copy
* Update cache/src/test/kotlin/com/dropbox/android/external/cache4/DefaultCacheTest.kt
Co-authored-by: Mike Nakhimovich <digitalbuddha@users.noreply.github.com>
* Add Rx returning equivalents of get and fetch convenience functions
* Add RxSingleStoreExtensionsTest.kt
Shows usage of Rx extension functions on Store.
* Fix test assertion
* Rename extension functions to match main module
* Add new line to end of files
Required by ktlint rules.
* Update public API
Adds the two new extension functions from this change set.
* Rename extension function names
Avoid confusion with extension functions from the main artefact.
* Add ExperimentalStdlibApi annotation to RxSingleStoreExtensionsTest
* Migrate cache library to use kotlin.time APIs
* Fix docs and inline durations in tests
* Migrate cache library to use kotlin.time APIs
* Only require ExperimentalTime when setting cache expiration
* Set ExperimentalTime on RealStore to use it on MemoryPolicy
* Set ExperimentalTime on Cache interface and not on functions
* Avoid ExperimentalTime annotation in filesystem module
* Remove unneeded ExpirationTime annotation
* Remove unneeded ExpirationTime annotation
* MakeSharedFlowProducer APIs safe
This PR fixes a bug in SharedFlowProducer where it would not handle start being called
multiple times or cancel being called before start is completed. It could even consume
the upstream flow multiple times if start is called multiple times.
Fixes: #120
Test: SharedFlowProducerTest
* get rid of unnecessary start call
* Update KDoc for Store::observe
Refer to RxJava Flowable instead of Coroutine Flow.
* Update KDoc for StoreBuilder::withSinglePersister
The function `persister` is in a different class so we need to refer to
it by its FQN otherwise the IDE whinges at us.
* Convert RedditActivity, RoomActivity, and StreamActivity to fragment
* Add bottom navigation bar and icons
* Add navigation component and constraint layout dependency
* Ensure network starts after disk is established
This PR fixes a bug in the ordering where if disk is skipped and network
is super fast, there is a tiny chance that we wouldn't latch onto source
of truth before triggering network and that would make SourceOfTruth think
that the value was written to disk before it observed, hence become a disk
value rather than fetcher.
This PR ensures that we unlock the network only after we establish a position
in the disk read queue so that we'll know the fetcher value came afterwards.
Fixes: 114
Test: RxSingleStoreTest
* Apply suggestions from code review
* move network unlock to disk flow setup for clarity
Co-authored-by: Mike Nakhimovich <digitalbuddha@users.noreply.github.com>
* more tests!
* Start tracking API binary compatibility (#97)
* Configure binary-compatibility-validator plugin.
* Generate current API dumps.
* Update CONTRUBUTON.md with instruction for updating API dumps.
* ktlint fix
* newlines
* put fs eraser back in
* more tests!
* ktlint fix
* newlines
* put fs eraser back in
* run api checks
* lint
* lint
Co-authored-by: Yang <ychescale9@gmail.com>
* Revert "Prepare next development version."
This reverts commit 4397b4390d.
* Revert "Prepare for release 4.0.0-alpha04"
This reverts commit 671bfeaf26.
* [WIP] Add code coverage
* Get multi-module and merging working
* Add CodeCov
* Update location of report.xml
* Check instead of build depends on Jacoco
* Do not merge coverage
* Ignore tests
* update comment
* Fix a ConcurrentModificationException by synchronizing the accessQueue (MutableSet) before iterating over it.
* Add test to verify ConcurrentModificationException is not thrown when performing evictions concurrently.
* Fix typos.
* Gradle 6.1, AGP 4.0.0-alpha09, lifecycle 2.2.0.
* Add experimental invalidateAll() support and @ExperimentalStoreAPI annotation.
* Update sample with deleteAll function.
* Update README.md with deleteAll function.
* Add a section to README.md on clearing store entries.
* Rewrite tests without mocking. Move test utils / helpers to a single package.
* Code formatting and cleanups.
* Use StoreResponse.Data instead of DataWithOrigin in ClearAllStoreTest and ClearStoreByKeyTest.
* Simplified samples. Refactor tests.
* Gradle 6.1.1.
* Change flow collection util to drain the flow
This PR changes the assertItems util method in tests to drain the
flow to ensure we don't produce unwated items.
* reformat code
* Use a test subject for flow assertions
* update test subject messsages, add tests for it (so meta :p)
* Apply suggestions from code review
Co-Authored-By: Eyal Guthmann <eyalgu@users.noreply.github.com>
* fix code style
* Don't try to get exception unless collection finished
This fixes a bug in FlowSubject where it would try to get the cancelation
exception from an unfinished job. Also added a test.
Co-authored-by: Eyal Guthmann <eyalgu@users.noreply.github.com>