-
Notifications
You must be signed in to change notification settings - Fork 616
Add unit tests for new logging in GaugeManager using GaugeCounter. #6953
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
Conversation
Coverage Report 1Affected Products
Test Logs |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Test Results 110 files 110 suites 2m 9s ⏱️ Results for commit 9ce45e7. ♻️ This comment has been updated with latest results. |
Size Report 1Affected Products
Test Logs |
private val gaugeManager: GaugeManager = GaugeManager.getInstance() | ||
private val logger = AndroidLogger.getInstance() | ||
// TODO(b/394127311): Setting this as a var for a unit test. Refactor it. | ||
var gaugeManager: GaugeManager = GaugeManager.getInstance() |
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.
You could do something like:
var gaugeManager: ...
internal set
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.
And maybe even @set:VisibleForTesting
?
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.
Done.
import org.robolectric.shadows.ShadowPackageManager; | ||
|
||
public class FirebasePerformanceTestBase { | ||
@BeforeClass |
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.
Can you do it @After
instead? Then be a good citizen to other unit tests in the future
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.
Done.
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.
For some reason the unit tests fails on Github Actions (but not locally) with @After
. Reverted it and added a TODO.
…6953) - Fixes relevant unit tests - specifically requiring a definite `ApplicationProcessState` - Adds new unit tests for the updated behaviour - Deletes unit tests that *should* be OK to delete.
…6953) - Fixes relevant unit tests - specifically requiring a definite `ApplicationProcessState` - Adds new unit tests for the updated behaviour - Deletes unit tests that *should* be OK to delete.
ApplicationProcessState