-
Notifications
You must be signed in to change notification settings - Fork 533
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Initial introduction of test coroutine dispatchers to replace Kotlin's test coroutine dispatcher. This includes introducing a test-only module to contain testing dependencies. * Introduce a new LiveData mechanism to bridge coroutines from DataProviders in a way that doesn't have the same limitations as the previous MutableLiveData-based bridge. * Early work at introducing FakeSystemClock tests (not yet complete). * Remove infeasible testing structures, add documentation, and clean up implementation to prepare for code review. * Add notice that the dispatchers utility is temporary. * Cleanup new LiveData bridge, add tests for it, and migrate other DataProviders tests to using TestCoroutineDispatchers utility. * Add AsyncResult tests, fix & re-enable an earlier test in PersistentCacheStoreTest, and fix FakeSystemClock so that it works properly in test environments. * Use ktlint to reformat TestCoroutineDispatchers per reviewer comment thread. * Reformat files failing linter check. * Address reviewer comment.
- Loading branch information
1 parent
6f31261
commit 9cb5817
Showing
13 changed files
with
1,031 additions
and
508 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
202 changes: 106 additions & 96 deletions
202
data/src/test/java/org/oppia/data/persistence/PersistentCacheStoreTest.kt
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.