-
Notifications
You must be signed in to change notification settings - Fork 642
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
Changes from 15 commits
8ce0966
89a7580
88a99cc
376039b
64f9757
1dbc82a
c38a5ae
1898233
d445068
3fb01a6
4446dbd
fd0282d
450ced4
70cb3d0
f206a7b
7cc04c5
9ce45e7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,12 +25,19 @@ | |
import com.google.firebase.perf.config.ConfigResolver; | ||
import com.google.firebase.perf.session.PerfSession; | ||
import com.google.firebase.perf.session.SessionManager; | ||
import com.google.firebase.perf.session.gauges.GaugeCounter; | ||
import com.google.firebase.perf.util.ImmutableBundle; | ||
import org.junit.After; | ||
import org.junit.Before; | ||
import org.junit.BeforeClass; | ||
import org.robolectric.shadows.ShadowLog; | ||
import org.robolectric.shadows.ShadowPackageManager; | ||
|
||
public class FirebasePerformanceTestBase { | ||
@BeforeClass | ||
|
||
public static void setUpBeforeClass() { | ||
GaugeCounter.INSTANCE.resetCounter(); | ||
} | ||
|
||
/** | ||
* The following values are needed by Firebase to identify the project and application that all | ||
|
@@ -56,6 +63,7 @@ public class FirebasePerformanceTestBase { | |
|
||
@Before | ||
public void setUpFirebaseApp() { | ||
ShadowLog.stream = System.out; | ||
appContext = ApplicationProvider.getApplicationContext(); | ||
|
||
ShadowPackageManager shadowPackageManager = shadowOf(appContext.getPackageManager()); | ||
|
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:
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.