-
Notifications
You must be signed in to change notification settings - Fork 64
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
RUMM-2183 Nightly tests for ConfigurationBuilder#setVitalsUpdateFrequency #929
RUMM-2183 Nightly tests for ConfigurationBuilder#setVitalsUpdateFrequency #929
Conversation
d0feae5
to
b63545e
Compare
// Give some time to vitals monitors to be updated | ||
Thread.sleep(5000) | ||
scenario.onActivity { | ||
InstrumentationRegistry.getInstrumentation().callActivityOnPause(it) |
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.
why do we need to call pause and then resume?
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 because I want to make sure I get some choreographer updates.
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 was thinking that Choreographer
always does postFrameCallback
, even if nothing happens on the screen (so it is sufficient only to launch
an activity), but maybe my knowledge is wrong.
initializeSdk( | ||
InstrumentationRegistry.getInstrumentation().targetContext, | ||
TrackingConsent.GRANTED, | ||
Configuration |
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 would suggest either to extract configuration
into a dedicated variable to reduce the indent level, or extract custom viewStrategy
into a dedicated class for the same purpose.
Codecov Report
@@ Coverage Diff @@
## mconstantin/rumm-2076/mobile-vitals-uptate-frequency-option #929 +/- ##
===============================================================================================
+ Coverage 82.64% 82.79% +0.14%
===============================================================================================
Files 265 265
Lines 9006 9006
Branches 1449 1449
===============================================================================================
+ Hits 7443 7456 +13
+ Misses 1167 1156 -11
+ Partials 396 394 -2
|
00f3f1c
to
6c6a438
Compare
// Give some time to vitals monitors to be updated | ||
Thread.sleep(5000) | ||
scenario.onActivity { | ||
InstrumentationRegistry.getInstrumentation().callActivityOnPause(it) |
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 was thinking that Choreographer
always does postFrameCallback
, even if nothing happens on the screen (so it is sufficient only to launch
an activity), but maybe my knowledge is wrong.
exclude = listOf(VitalsUpdateFrequency.NEVER) | ||
) | ||
val testMethodName = "rum_config_set_vitals_update_frequency" | ||
// we need to initialize the SDK on the Main Thread (Looper thread) otherwise the |
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.
very minor: this comment belongs to L750.
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.
@0xnm regarding the choreographer...you are not wrong, for some reason during my tests sometimes it was not triggered if I didn't play a bit with the activity.
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.
very minor: this comment belongs to L750.
yeah, I think it was messed up after I did the refactor by extracting the variable.
6c6a438
to
679fc51
Compare
What does this PR do?
Adding the nightly tests for newly introduce API :
ConfigurationBuilder#setVitalsUpdateFrequency
Increasing the nightly tests coverage to 0.94
Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)