Skip to content

[Dependency Updates] Update kotlinxCoroutinesVersion to 1.6.4#17673

Merged
ParaskP7 merged 29 commits intotrunkfrom
deps/update-kotlinx-coroutines-to-1.6.4
Dec 20, 2022
Merged

[Dependency Updates] Update kotlinxCoroutinesVersion to 1.6.4#17673
ParaskP7 merged 29 commits intotrunkfrom
deps/update-kotlinx-coroutines-to-1.6.4

Conversation

@ParaskP7
Copy link
Copy Markdown
Contributor

@ParaskP7 ParaskP7 commented Dec 15, 2022

Parent #17560
Unblocks: #17561

This PR updates kotlinxCoroutinesVersion to 1.6.4.

Also, as part of this update the below transitive dependencies were added on the WordPress module (4c3fa54):

  • org.jetbrains.kotlinx:kotlinx-coroutines-core

PS: I recommend doing the code review process commit-by-commit and with the help of AS (or any IDE for that matter). This is because some commits have hundreds of one line changes, and that, might be overwhelming to do via GitHub alone.


Migration Guide

FYI: If it helps, WCAndroid did such an update a while ago (Apr 19 2022). As such, if you would like to reference or cross-check changes, feel free to visit that update here: Bump coroutines version to 1.6 #6292


Migration/Structural Changes:

  1. Rename main coroutine scope rule to coroutine test rule.
  2. Migrate to new coroutine test rule.
  3. Replace coroutines utils test utility function with base unit test.
  4. Replace instant task executor rule function with base unit test.
  5. Replace coroutines utils with coroutines test rule test dispatcher. (CoroutinesUtils.TEST_DISPATCHER replacement/removal)
  6. Replace run blocking test with test from base unit test.
  7. Replace coroutines utils with coroutines test rule test scope. (CoroutinesUtils.testScope() replacement/removal)
  8. Remove the now unused coroutines utils file. (CoroutinesUtils removal)
  9. Replace custom dispatcher with test dispatcher from base unit test.

Fix Tests Changes:

  1. Fix coroutines related test failure due to field test class init.
  2. Fix use case load data tests with advance until idle.
  3. Fix assert view all followers second load test condition.
  4. Fix maps full most popular insights to ui model test condition.
  5. Fix maps referrers to ui model test conditions.
  6. Fix load latest post summary tests with advance until idle.
  7. Fix base stats use case tests with advance until idle.
  8. Fix view model start/invoke tests with advance until idle.

Fix Tests but also Ignore Changes:

  1. Fix site preview view model tests by triggering flow completion.
  2. Fix reader related tests on pause/resume dispatcher failures.

Refactor Changes:

  1. Replace coroutines test rule test scope with helper function.
  2. Replace coroutines test rule test dispatcher with helper function.

Minor but Mass Changes:

  1. Remove unused org wordpress android test import. (CoroutinesUtils.test { ... } replacement/removal)
  2. Add missing experimental coroutines api annotation to all tests.

Minor Changes:

  1. Migrate test coroutine scope to test scope for qr code auth vm.
  2. Reformat base unit test class.

PS: @RenanLukas I added you as the main reviewer, that is, in addition to the @wordpress-mobile/apps-infrastructure team itself, but randomly, since I just wanted someone from the WordPress team to be aware of and sign-off on that change for WPAndroid.


To test:

  1. See the dependency tree diff result and verify correctness.
  2. Thoroughly smoke test both, the WordPress and Jetpack apps, and see if they both work as expected.

Note the fact that:

  • This kotlinxCoroutinesVersion update is only related to testing. As such, there was no code changes related to main code. However, that doesn't mean that the main apps' functionality couldn't have been affected by this update. So, please be extra careful when reviewing this PR and make sure to test both apps thoroughly.

Merge instructions

  • Wait for this PR to be fully review and approved.
  • Update PR with latest trunk.
  • Migrate any new tests that might have been added to trunk during the review period.
  • Remove [PR] Not Ready For Merge] label.
  • Merge PR to trunk.

Regression Notes

  1. Potential unintended areas of impact

    • Potential breakage of screens and core functionality as org.jetbrains.kotlinx is a library that is being added as a transitive dependency across lots of androidx and com.google and other libraries.
    • Some of the transitive dependencies added might be causing some kind of misbehaviour.
  2. What I did to test those areas of impact (or what existing automated tests I relied on)

    • See To test section above.
  3. What automated tests I added (or what prevented me from doing so)

    • N/A

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

It is generally recommended that transitively used dependencies should
be declared directly.
Release Notes: https://github.com/Kotlin/kotlinx.coroutines/releases/
tag/1.6.4
Breaking Release: https://github.com/Kotlin/kotlinx.coroutines/releases/
tag/1.6.0
Migration Guide: https://github.com/Kotlin/kotlinx.coroutines/blob/
1.6.0/kotlinx-coroutines-test/MIGRATION.md

------------------------------------------------------------------------

As part of this change, the below 'kotlinx.coroutines.test' related
imports had to be explicitly added, otherwise the corresponding tests
were failing to compile as those imports are now seen as missing:
- kotlinx.coroutines.test.advanceUntilIdle
- kotlinx.coroutines.test.advanceTimeBy
- kotlinx.coroutines.test.pauseDispatcher
- kotlinx.coroutines.test.resumeDispatcher

PS: 3/4 of the above imports are now deprecated as well. As such, those
need to be updated accordingly. This is going to be done in subsequent
commits. Below are the deprecated imports:
- kotlinx.coroutines.test.advanceTimeBy
- kotlinx.coroutines.test.pauseDispatcher
- kotlinx.coroutines.test.resumeDispatcher

In addition to that, lots of other 'kotlinx.coroutines.test' imports got
deprecated as well, like 'TestCoroutineDispatcher',
'TestCoroutineScope', 'runBlockingTest', etc. All those need to be
dealt with as well.

PS: All the above is expected because the KotlinX Coroutines 1.6.0
release was a breaking one, but testing wise only.
This is done to match the setup on WCAndroid so that to start making
progress on consistency across repos.
With this change, this 'CoroutineTestRule' is also moved to
'BaseUnitTest', which is now using an 'UnconfinedTestDispatcher' to
instantiate this rule.

In addition to that a new 'test { ... }' utility function is added to
'BaseUnitTest', which will effectively substitutes the 'CoroutineUtils'
such related utility function.

------------------------------------------------------------------------

TODO:
- advanceTimeBy
- pauseDispatcher
- resumeDispatcher

------------------------------------------------------------------------

This is done to match the setup on WCAndroid so that to start making
progress on testing consistency across repos.
Since 'test { ... }' is now part of 'BaseUnitTest', every test that
extends from is it already able to access it. As such, those test no
longer depend on the soon to be removed 'CoroutinesUtils' related such
'test { ... }' utility function.
Since 'BaseUnitTest' is now using an '@ExperimentalCoroutinesApi'
annotation, all tests that extend from it should also be annotated with
this annotation.
As part of this change the below was done:
- Tests got extended with 'BaseUnitTest'.
- The '@ExperimentalCoroutinesApi' annotation was added to those tests
(due to 'BaseUnitTest').
- The explicit 'InstantTaskExecutorRule' rule was removed from
those tests (as it is now implicitly added via 'BaseUnitTest').
As part of this change the below was done:
- Tests got extended with 'BaseUnitTest'.
- The '@ExperimentalCoroutinesApi' annotation was added to those tests
(due to 'BaseUnitTest').
As part of this change the below was done:
- The '@InternalCoroutinesApi' annotation was removed from those tests
(it is no longer needed).
- A new instance of 'UnconfinedTestDispatcher' was added whenever the
'coroutinesTestRule.testDispatcher' could not be accessed
(see 'companion object' access).
- 'test { ... }' was added to some tests in order to access Coroutine
related test scope utilities like 'advanceTimeBy' due to the fact that
'coroutineDispatcher' was no longer accessible as a field.
(see 'SitePreviewViewModelTest' test).
- 'test { ... }' replaced 'runBlockingTest(coroutineContext)' on some
tests due to the fact that 'coroutineContext' was no longer accessible
as a field (see 'SnackbarSequencerConcurrentTest' test).
The 'JetpackMigrationViewModelTest' test suite and some of its tests are
failing because the 'classToTest' object is being initialized via a
field and not during the 'setUp()' phase.

As such, the 'CoroutineTestRule' is not able to run the 'starting(..)'
and 'finished(...)' process that sets and resets the test dispatchers.

------------------------------------------------------------------------

Exception in thread "Test worker" java.lang.IllegalStateException:
Module with the Main dispatcher had failed to initialize. For tests
Dispatchers.setMain from kotlinx-coroutines-test module can be used
java.lang.IllegalStateException: Module with the Main dispatcher had
failed to initialize. For tests Dispatchers.setMain from
kotlinx-coroutines-test module can be used
    at kotlinx.coroutines.internal.MissingMainCoroutineDispatcher
      .missing(MainDispatchers.kt:118)
    ...
Caused by: java.lang.IllegalStateException: The main looper is not
available
    at kotlinx.coroutines.android.AndroidDispatcherFactory
      .createDispatcher(HandlerDispatcher.kt:55)
    ...
    ... 38 more
These tests are otherwise failing because the 'checkNotNull(result)'
immediately checks for the 'result' value without waiting for the
'useCase.fetch(...)' function to complete first.
Also, as part of this commit, two tests, animate field and loading state
related, were ignored due the way they are structured causing them to
run indefinitely without completing.

Maybe there is a way to re-write those tests and remove the '@ignore'
annotation from them. I tried it, time-boxing my efforts, but I couldn't
figure out a good way to do so.

For more info see: https://github.com/Kotlin/kotlinx.coroutines/blob/
1.6.0/kotlinx-coroutines-test/MIGRATION.md#
replace-advancetimebyn-with-advancetimebyn-runcurrent
Also, as part of this commit, four tests, initial state related, were
ignored due the way they are structured causing them fail.

Maybe there is a way to re-write those tests and remove the '@ignore'
annotation from them. I tried it, time-boxing my efforts, but I couldn't
figure out a good way to do so.

For more info see: https://github.com/Kotlin/kotlinx.coroutines/blob/
1.6.0/kotlinx-coroutines-test/MIGRATION.md#replace-usages-of-
pausedispatcher-and-resumedispatcher-with-a-standardtestdispatcher
@ParaskP7 ParaskP7 requested review from a team and RenanLukas December 15, 2022 16:31
@ParaskP7 ParaskP7 self-assigned this Dec 15, 2022
@wpmobilebot
Copy link
Copy Markdown
Contributor

Found 1 violations:

The PR caused the following dependency changes:

-+--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10
-|    +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10
-|    |    +--- org.jetbrains:annotations:13.0
-|    |    \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.6.10
-|    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.10
-|         \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 (*)
++--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 -> 1.6.21
+|    +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.21
+|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.6.21
+|    |    \--- org.jetbrains:annotations:13.0
+|    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.21
+|         \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.21 (*)
 +--- project :libs:analytics
 |    +--- com.automattic:Automattic-Tracks-Android:2.2.0
-|    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.4.31 -> 1.6.10 (*)
+|    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.4.31 -> 1.6.21 (*)
 |    |    \--- io.sentry:sentry-android-okhttp -> 5.4.3
 |    |         +--- com.squareup.okhttp3:okhttp -> 4.9.2
 |    |         |    +--- com.squareup.okio:okio:2.8.0 -> 2.10.0
-|    |         |    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.4.20 -> 1.6.10 (*)
+|    |         |    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.4.20 -> 1.6.21 (*)
-|    |         |    |    \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.4.20 -> 1.6.10
+|    |         |    |    \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.4.20 -> 1.6.21
-|    |         |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.4.10 -> 1.6.10 (*)
+|    |         |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.4.10 -> 1.6.21 (*)
-|    |         \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.32 -> 1.6.10 (*)
+|    |         \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.32 -> 1.6.21 (*)
 |    \--- androidx.preference:preference:1.1.0
 |         \--- androidx.appcompat:appcompat:1.1.0 -> 1.3.1
 |              +--- androidx.activity:activity:1.2.4 -> 1.3.1
 |              |    \--- androidx.lifecycle:lifecycle-viewmodel:2.3.1 -> 2.4.1
-|              |         \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.30 -> 1.6.10 (*)
+|              |         \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.30 -> 1.6.21 (*)
 |              \--- androidx.fragment:fragment:1.3.6 -> 1.4.1
 |                   +--- androidx.core:core-ktx:1.2.0 -> 1.7.0
-|                   |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.31 -> 1.6.10 (*)
+|                   |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.31 -> 1.6.21 (*)
-|                   \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.31 -> 1.6.10 (*)
+|                   \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.31 -> 1.6.21 (*)
 +--- project :libs:image-editor
-|    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 (*)
+|    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 -> 1.6.21 (*)
 |    +--- androidx.navigation:navigation-fragment:2.4.2
 |    |    +--- androidx.fragment:fragment-ktx:1.4.1
 |    |    |    +--- androidx.activity:activity-ktx:1.2.3 -> 1.3.1
 |    |    |    |    +--- androidx.lifecycle:lifecycle-runtime-ktx:2.3.1 -> 2.4.1
-|    |    |    |    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.5.30 -> 1.6.10 (*)
+|    |    |    |    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.5.30 -> 1.6.21 (*)
-|    |    |    |    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0 -> 1.5.2
-|    |    |    |    |         +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2
-|    |    |    |    |         |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.2
-|    |    |    |    |         |         +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30 -> 1.6.10 (*)
-|    |    |    |    |         |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.5.30 -> 1.6.10
-|    |    |    |    |         \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30 -> 1.6.10 (*)
+|    |    |    |    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0 -> 1.6.4
+|    |    |    |    |         +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4
+|    |    |    |    |         |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4
+|    |    |    |    |         |         +--- org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.6.4
+|    |    |    |    |         |         |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4 (c)
+|    |    |    |    |         |         |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4 (c)
+|    |    |    |    |         |         |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4 (c)
+|    |    |    |    |         |         +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21 (*)
+|    |    |    |    |         |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.6.21
+|    |    |    |    |         +--- org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.6.4 (*)
+|    |    |    |    |         \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21 (*)
 |    |    |    |    +--- androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1 -> 2.4.1
-|    |    |    |    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.5.30 -> 1.6.10 (*)
+|    |    |    |    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.5.30 -> 1.6.21 (*)
-|    |    |    |    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0 -> 1.5.2 (*)
+|    |    |    |    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0 -> 1.6.4 (*)
 |    |    |    |    +--- androidx.savedstate:savedstate-ktx:1.1.0
-|    |    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.4.20 -> 1.6.10 (*)
+|    |    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.4.20 -> 1.6.21 (*)
-|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.21 -> 1.6.10 (*)
+|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.21 -> 1.6.21 (*)
 |    |    |    +--- androidx.collection:collection-ktx:1.1.0
-|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.3.20 -> 1.6.10 (*)
+|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.3.20 -> 1.6.21 (*)
 |    |    |    +--- androidx.lifecycle:lifecycle-livedata-core-ktx:2.3.1 -> 2.4.1
-|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.30 -> 1.6.10 (*)
+|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.30 -> 1.6.21 (*)
-|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.31 -> 1.6.10 (*)
+|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.31 -> 1.6.21 (*)
 |    |    +--- androidx.navigation:navigation-runtime:2.4.2
 |    |    |    +--- androidx.navigation:navigation-common:2.4.2
-|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.0 -> 1.6.10 (*)
+|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.0 -> 1.6.21 (*)
-|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.0 -> 1.6.10 (*)
+|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.0 -> 1.6.21 (*)
 |    |    +--- androidx.slidingpanelayout:slidingpanelayout:1.2.0
 |    |    |    \--- androidx.window:window:1.0.0
-|    |    |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.0 -> 1.6.10 (*)
+|    |    |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.0 -> 1.6.21 (*)
-|    |    |         \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2 (*)
+|    |    |         \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2 -> 1.6.4 (*)
-|    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.0 -> 1.6.10 (*)
+|    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.0 -> 1.6.21 (*)
 |    \--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.6.10
-|         +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 (*)
+|         +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 -> 1.6.21 (*)
 |         \--- org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.6.10
-|              \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 (*)
+|              \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 -> 1.6.21 (*)
 +--- project :libs:editor
 |    +--- org.wordpress:aztec:{strictly v1.6.2} -> v1.6.2
-|    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.4.20 -> 1.6.10 (*)
+|    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.4.20 -> 1.6.21 (*)
-|    |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.1.0 -> 1.5.2 (*)
+|    |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.1.0 -> 1.6.4 (*)
-|    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.1.0 -> 1.5.2 (*)
+|    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.1.0 -> 1.6.4 (*)
 |    +--- org.wordpress.aztec:wordpress-shortcodes:{strictly v1.6.2} -> v1.6.2
-|    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.4.20 -> 1.6.10 (*)
+|    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.4.20 -> 1.6.21 (*)
 |    +--- org.wordpress.aztec:wordpress-comments:{strictly v1.6.2} -> v1.6.2
-|    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.4.20 -> 1.6.10 (*)
+|    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.4.20 -> 1.6.21 (*)
-|    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 (*)
+|    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 -> 1.6.21 (*)
 |    \--- org.wordpress-mobile.gutenberg-mobile:react-native-gutenberg-bridge:v1.86.0
 |         +--- com.github.wordpress-mobile:react-native-gesture-handler:2.3.2-wp-2
-|         |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.20 -> 1.6.10 (*)
+|         |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.20 -> 1.6.21 (*)
 |         +--- org.wordpress-mobile.react-native-libraries.v1:react-native-webview:11.6.2
-|         |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.4.10 -> 1.6.10 (*)
+|         |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.4.10 -> 1.6.21 (*)
 |         +--- org.wordpress-mobile.gutenberg-mobile:react-native-aztec:v1.86.0
 |         |    +--- org.wordpress.aztec:glide-loader:v1.6.2
-|         |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.4.20 -> 1.6.10 (*)
+|         |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.4.20 -> 1.6.21 (*)
-|         |    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.32 -> 1.6.10 (*)
+|         |    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.32 -> 1.6.21 (*)
-|         \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.32 -> 1.6.10 (*)
+|         \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.32 -> 1.6.21 (*)
 +--- org.wordpress:fluxc:{strictly trunk-35bc4b0194946cdef6aedf45be77e4f1d6dc6126} -> trunk-35bc4b0194946cdef6aedf45be77e4f1d6dc6126
-|    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 (*)
+|    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 -> 1.6.21 (*)
 |    +--- com.squareup.okhttp3:okhttp-urlconnection:4.9.0 -> 4.9.2
-|    |    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10 -> 1.6.10 (*)
+|    |    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10 -> 1.6.21 (*)
 |    +--- androidx.room:room-ktx:2.4.2
-|    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 (*)
+|    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 -> 1.6.21 (*)
-|    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2 (*)
+|    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2 -> 1.6.4 (*)
-|    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9 -> 1.5.2 (*)
+|    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9 -> 1.6.4 (*)
-|    \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9 -> 1.5.2 (*)
+|    \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9 -> 1.6.4 (*)
 +--- org.wordpress:utils:{strictly 3.1.0} -> 3.1.0
-|    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.10 (*)
+|    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.10 -> 1.6.21 (*)
 +--- org.wordpress:login:1.0.0
-|    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 (*)
+|    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 -> 1.6.21 (*)
 +--- com.automattic:about:1.0.0
-|    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31 -> 1.6.10 (*)
+|    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31 -> 1.6.21 (*)
 |    +--- androidx.compose.ui:ui:1.0.5 -> 1.1.1
 |    |    +--- androidx.compose.runtime:runtime-saveable:1.1.1
 |    |    |    +--- androidx.compose.runtime:runtime:1.1.1
-|    |    |    |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2 (*)
+|    |    |    |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2 -> 1.6.4 (*)
-|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 (*)
+|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 -> 1.6.21 (*)
-|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 (*)
+|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 -> 1.6.21 (*)
 |    |    +--- androidx.compose.ui:ui-geometry:1.1.1
 |    |    |    +--- androidx.compose.ui:ui-util:1.1.1
-|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 (*)
+|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 -> 1.6.21 (*)
-|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 (*)
+|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 -> 1.6.21 (*)
 |    |    +--- androidx.compose.ui:ui-graphics:1.1.1
 |    |    |    +--- androidx.compose.ui:ui-unit:1.1.1
-|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 (*)
+|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 -> 1.6.21 (*)
-|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.6.10
+|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.6.10 -> 1.6.21
 |    |    +--- androidx.compose.ui:ui-text:1.1.1
-|    |    |    +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.6.10
+|    |    |    +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.6.10 -> 1.6.21
-|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 (*)
+|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 -> 1.6.21 (*)
-|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.6.10
+|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.6.10 -> 1.6.21
-|    |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2 (*)
+|    |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2 -> 1.6.4 (*)
-|    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 (*)
+|    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 -> 1.6.21 (*)
-|    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2 (*)
+|    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2 -> 1.6.4 (*)
 |    +--- androidx.compose.ui:ui-tooling:1.0.5
 |    |    +--- androidx.compose.ui:ui-tooling-preview:1.0.5 -> 1.1.1
-|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 (*)
+|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 -> 1.6.21 (*)
 |    |    +--- androidx.compose.ui:ui-tooling-data:1.0.5
-|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.31 -> 1.6.10 (*)
+|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.31 -> 1.6.21 (*)
-|    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.5.31 -> 1.6.10 (*)
+|    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.5.31 -> 1.6.21 (*)
 |    |    +--- androidx.compose.material:material:1.0.5 -> 1.1.1
 |    |    |    +--- androidx.compose.animation:animation-core:1.0.0 -> 1.1.1
-|    |    |    |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2 (*)
+|    |    |    |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2 -> 1.6.4 (*)
-|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 (*)
+|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 -> 1.6.21 (*)
 |    |    |    +--- androidx.compose.foundation:foundation:1.1.1
 |    |    |    |    +--- androidx.compose.animation:animation:1.1.1
 |    |    |    |    |    +--- androidx.compose.foundation:foundation-layout:1.0.0 -> 1.1.1
-|    |    |    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.6.10
+|    |    |    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.6.10 -> 1.6.21
-|    |    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.6.10
+|    |    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.6.10 -> 1.6.21
-|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.6.10
+|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.6.10 -> 1.6.21
 |    |    |    +--- androidx.compose.material:material-icons-core:1.1.1
-|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 (*)
+|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 -> 1.6.21 (*)
 |    |    |    +--- androidx.compose.material:material-ripple:1.1.1
-|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.6.10
+|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.6.10 -> 1.6.21
-|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.6.10
+|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.6.10 -> 1.6.21
 |    |    \--- androidx.activity:activity-compose:1.3.1
-|    |         \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.21 -> 1.6.10 (*)
+|    |         \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.21 -> 1.6.21 (*)
 |    +--- androidx.navigation:navigation-compose:2.4.0-beta02
 |    |    +--- androidx.lifecycle:lifecycle-viewmodel-compose:2.4.0-rc01 -> 2.4.1
-|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.30 -> 1.6.10 (*)
+|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.30 -> 1.6.21 (*)
-|    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.31 -> 1.6.10 (*)
+|    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.31 -> 1.6.21 (*)
 |    +--- com.google.accompanist:accompanist-drawablepainter:0.20.2
-|    |    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31 -> 1.6.10 (*)
+|    |    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31 -> 1.6.21 (*)
 |    \--- com.google.android.material:compose-theme-adapter:1.1.1
-|         \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.0 -> 1.6.10 (*)
+|         \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.0 -> 1.6.21 (*)
 +--- com.automattic:stories:2.0.0
-|    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.20 -> 1.6.10 (*)
+|    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.20 -> 1.6.21 (*)
 |    +--- org.jetbrains.kotlinx:kotlinx-serialization-runtime:1.0-M1-1.4.0-rc
 |    |    \--- org.jetbrains.kotlinx:kotlinx-serialization-runtime-jvm:1.0-M1-1.4.0-rc
-|    |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.4.0-rc -> 1.6.10 (*)
+|    |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.4.0-rc -> 1.6.21 (*)
-|    |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.4.0-rc -> 1.6.10
+|    |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.4.0-rc -> 1.6.21
 |    +--- org.jetbrains.kotlin:kotlin-reflect:1.4.20
-|    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.4.20 -> 1.6.10 (*)
+|    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.4.20 -> 1.6.21 (*)
 |    +--- com.automattic.stories:photoeditor:2.0.0
-|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.20 -> 1.6.10 (*)
+|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.20 -> 1.6.21 (*)
-|    |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9 -> 1.5.2 (*)
+|    |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9 -> 1.6.4 (*)
 |    |    \--- com.automattic.stories:mp4compose:2.0.0
-|    |         \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.20 -> 1.6.10 (*)
+|    |         \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.20 -> 1.6.21 (*)
 |    +--- androidx.lifecycle:lifecycle-livedata-ktx:2.2.0 -> 2.4.1
-|    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.5.30 -> 1.6.10 (*)
+|    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.5.30 -> 1.6.21 (*)
-|    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0 -> 1.5.2 (*)
+|    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0 -> 1.6.4 (*)
-|    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9 -> 1.5.2 (*)
+|    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9 -> 1.6.4 (*)
 +--- androidx.work:work-runtime-ktx:2.7.0
-|    +--- org.jetbrains.kotlin:kotlin-stdlib:1.5.30 -> 1.6.10 (*)
+|    +--- org.jetbrains.kotlin:kotlin-stdlib:1.5.30 -> 1.6.21 (*)
-|    \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0 -> 1.5.2 (*)
+|    \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0 -> 1.6.4 (*)
 +--- androidx.compose.runtime:runtime-livedata:1.1.1
-|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 (*)
+|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 -> 1.6.21 (*)
 +--- io.coil-kt:coil-compose:1.4.0
 |    \--- io.coil-kt:coil:1.4.0
 |         \--- io.coil-kt:coil-base:1.4.0
-|              +--- org.jetbrains.kotlin:kotlin-stdlib:1.5.30 -> 1.6.10 (*)
+|              +--- org.jetbrains.kotlin:kotlin-stdlib:1.5.30 -> 1.6.21 (*)
-|              \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2 (*)
+|              \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2 -> 1.6.4 (*)
 +--- com.zendesk:support:5.0.2
 |    \--- com.zendesk:support-providers:5.0.2
 |         \--- com.zendesk:core:4.0.2
 |              \--- com.squareup.okhttp3:logging-interceptor:3.12.1 -> 4.9.2
-|                   \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10 -> 1.6.10 (*)
+|                   \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10 -> 1.6.21 (*)
-+--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2 (*)
-\--- com.google.dagger:hilt-android:2.42
-     \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 (*)
++--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4 (*)
++--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4 (*)
+\--- com.google.dagger:hilt-android:2.42
+     \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 -> 1.6.21 (*)

Please review and act accordingly

@wpmobilebot
Copy link
Copy Markdown
Contributor

wpmobilebot commented Dec 15, 2022

Jetpack📲 You can test these changes on Jetpack by downloading jetpack-installable-build-pr17673-d1d1a89.apk
💡 Scan this QR code with your Android phone to download and install the APK directly on it.
AppJetpack
Build FlavorJalapeno
Build TypeDebug
Commitd1d1a89
Note: This installable build uses the JalapenoDebug build flavor, and does not support Google Login.

@wpmobilebot
Copy link
Copy Markdown
Contributor

wpmobilebot commented Dec 15, 2022

WordPress📲 You can test these changes on WordPress by downloading wordpress-installable-build-pr17673-d1d1a89.apk
💡 Scan this QR code with your Android phone to download and install the APK directly on it.
AppWordPress
Build FlavorJalapeno
Build TypeDebug
Commitd1d1a89
Note: This installable build uses the JalapenoDebug build flavor, and does not support Google Login.

@RenanLukas RenanLukas self-assigned this Dec 16, 2022
Copy link
Copy Markdown
Contributor

@RenanLukas RenanLukas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this update, @ParaskP7.

The dependency tree seems fine to me. I've tested WP and JP and everything worked as expected.

LGTM :shipit:

@ParaskP7
Copy link
Copy Markdown
Contributor Author

👋 @RenanLukas and thank you so much for the review and testing, you rock! 🥇 ❤️ 🙇

PS: Let me know when you will fully complete the review process and I'll update and merge this PR.

Copy link
Copy Markdown
Contributor

@RenanLukas RenanLukas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @ParaskP7 , I've finished reviewing the changed files and left a few questions. If the changes I'm asking about are fine to you, the PR LGTM ✅ :shipit:

assertThat(result[1]).isTrue // build(...) -> refresh()
assertThat(result[2]).isFalse // build(...) -> cardsStore.fetchCards(...) -> error
assertThat(result[3]).isTrue // refresh()
assertThat(result[2]).isTrue // build(...) -> cardsStore.fetchCards(...) -> error
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just wanted to confirm if this is the expected change (from .isFalse to .isTrue and the opposite in the following line)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋 @RenanLukas , thank you for your comment and for being detailed on this! 🥇

This Coroutines update introduced a major shift in how our tests are structured. I tried to make those as straightforward as possible and also consistent with WCAndroid.


The most interesting part that you will notice is that I updated the MainCoroutineScopeRule (now named as CoroutineTestRule). And, as part of this update, you will notice that the finished(...) setup got updated from the below:

    override fun finished(description: Description?) {
        super.finished(description)
        advanceUntilIdle()
        cleanupTestCoroutines()
        Dispatchers.resetMain()
    }

And into the below:

    override fun finished(description: Description) {
        super.finished(description)
        Dispatchers.resetMain()
    }

As such, the below two extra configuration lines that were previously applied to all test got removed:

        advanceUntilIdle()
        cleanupTestCoroutines()

Thus, you also saw so many fix commits and fixed tests, where I had to manually add the advanceUntilIdle().


Having explained the above, my reasoning is that this caused the need for small tweaks like that.

Also, since I was the author of this CardsSourceTest.kt and knowing that I introduced this long list of asserts, per result, I know that they are not that easy to reason about as they were actually added automatically. I only added those extra asserts to make sure that when the main code gets updated, if the logic get unintentionally updated, those should warn the author of that change so that they are aware of it and so that they make sure that the update they did on the logic was intentional. Also, you will notice the comments per assert, those were added to make sure we can reason about the flow, but that's the extend of it, and actually, might even be outdated by now... 🤷

As such, and since this PR only updates the testing logic, I didn't worry too much about this change, that's why I ended up feeling comfortable to just update those values and make sure these tests still pass without adding any extra effort to verify whether the 1.6.4 update affected the main code. That's why I did and asked for a thorough test on this PR, so that we can verify its correctness main-code-wise as nothing else was done coding-wise there.

Does this makes sense? 🤔

PS: The same applies to BloggingPromptCardSourceTest.kt as I am seeing those tests got copy-pasted.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, makes sense. Thanks for the detailed explanation @ParaskP7 .

assertThat(result[1]).isTrue // build(...) -> refresh()
assertThat(result[2]).isFalse // build(...) -> bloggingPromptCardSource.fetchPrompts(...) -> success
assertThat(result[3]).isTrue // refresh()
assertThat(result[2]).isTrue // build(...) -> bloggingPromptCardSource.fetchPrompts(...) -> success
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question: I wanted to confirm if this is the expected change (from .isFalse to .isTrue and the opposite in the following line)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assertThat(this).hasSize(14)

val follower = this[13] as ListItemWithIcon
val follower = this[12] as ListItemWithIcon
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to confirm if this is the expected change (from this[13] to this[12])

Copy link
Copy Markdown
Contributor Author

@ParaskP7 ParaskP7 Dec 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋 @RenanLukas !

SAME, plus notice the fact that I added the advanceUntilIdle() and replaced the Dispatchers.Unconfined with the testDispatcher() during setup, that is, in addition to replacing the TEST_DISPATCHER with the testDispatcher(). I am actually not sure why it was done like that on all those use cases, but I thought this is a good opportunity to get rid of this customization for good. Thus, I am almost certain that this is why this assertion had to be updated as well.

PS: The same applies to AnnualSiteStatsUseCaseTest.kt.

selectedDate.set(Calendar.MONTH, Calendar.DECEMBER)
selectedDate.set(Calendar.DAY_OF_MONTH, 31)
verify(selectedDateProvider, times(2)).selectDate(selectedDate.time, listOf(selectedDate.time), ANNUAL_STATS)
verify(selectedDateProvider, times(1)).selectDate(selectedDate.time, listOf(selectedDate.time), ANNUAL_STATS)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to confirm if this is the expected change (from times(2) to times(1))

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ParaskP7
Copy link
Copy Markdown
Contributor Author

👋 @RenanLukas and once more, thank you so much for the review and testing, you are awesome! 🥇 ❤️ 🙇

I've finished reviewing the changed files and left a few questions.

I have replied to you questions and tried to give you enough context as to why I chose to progress with the test change without verifying whether the main code was affected by this update (see here and here). I hope my clarifications are enough for you to gain confidence on this update, just like they were enough for me to proceed forward and open this PR. 🤞


FYI: I'll go ahead and merge this PR to unblock the other updates (see here). Given the fact that we are now looking at our holiday period, meaning that we are going to skip the next code freeze, this will give us enough time to test this update during the development phase. This will give us more confidence to verify that everything is working as expected.

… into deps/update-kotlinx-coroutines-to-1.6.4

� Conflicts:
�	WordPress/src/test/java/org/wordpress/android/sharedlogin/resolver/SharedLoginResolverTest.kt
�	WordPress/src/test/java/org/wordpress/android/ui/main/jetpack/migration/JetpackMigrationViewModelTest.kt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants