-
Notifications
You must be signed in to change notification settings - Fork 226
Fix flaky incoming verification tests #4479
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
Fix flaky incoming verification tests #4479
Conversation
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #4479 +/- ##
========================================
Coverage 80.09% 80.09%
========================================
Files 2081 2081
Lines 55550 55550
Branches 6785 6785
========================================
Hits 44495 44495
Misses 8724 8724
Partials 2331 2331 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -57,7 +58,7 @@ class IncomingVerificationPresenter @AssistedInject constructor( | |||
|
|||
@Composable | |||
override fun present(): IncomingVerificationState { | |||
val coroutineScope = rememberCoroutineScope { Dispatchers.IO } | |||
val coroutineScope = rememberCoroutineScope { dispatchers.io } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for my understanding, why are we providing a dispatcher here? This is the only presenter using this pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it was done so we could avoid passing the dispatcher in every launch { ... }
call instead. Maybe it's just better to remove the whole dispatcher usage, if it doesn't affect the verification flow at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to work too, so let's try that as it simplifies everything.
725ba8c
to
5c0e768
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Content
dispatchers.io
value inIncomingVerificationPresenter
, not the default one, so we can provide it in the tests.Motivation and context
We had a couple of flaky tests making the development slower as we had to retry the test job several times.
Tests
If the CI is happy, we're happy.
Checklist