Skip to content

Commit fd0282d

Browse files
committed
Potential fix
1 parent 4446dbd commit fd0282d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

firebase-perf/src/test/java/com/google/firebase/perf/session/gauges/GaugeManagerTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ public void testGaugeCounterStartsAJobToConsumeTheGeneratedMetrics() {
346346
// There's still no job to log the gauges.
347347
assertThat(fakeScheduledExecutorService.isEmpty()).isTrue();
348348

349-
generateMetricsAndIncrementCounter(5);
349+
generateMetricsAndIncrementCounter(2);
350350

351351
assertThat(fakeScheduledExecutorService.isEmpty()).isFalse();
352352
assertThat(fakeScheduledExecutorService.getDelayToNextTask(TimeUnit.MILLISECONDS))
@@ -366,7 +366,7 @@ public void testGaugeCounterStartsAJobToConsumeTheGeneratedMetrics() {
366366
int recordedGaugeMetricsCount =
367367
recordedGaugeMetric.getAndroidMemoryReadingsCount()
368368
+ recordedGaugeMetric.getCpuMetricReadingsCount();
369-
assertThat(recordedGaugeMetricsCount).isEqualTo(29);
369+
assertThat(recordedGaugeMetricsCount).isEqualTo(26);
370370

371371
assertThat(recordedGaugeMetric.getSessionId()).isEqualTo(testSessionId(1));
372372
}
@@ -608,6 +608,8 @@ private long getMinimumBackgroundCollectionFrequency() {
608608

609609
// Simulates the behavior of Cpu and Memory Gauge collector.
610610
private void generateMetricsAndIncrementCounter(int count) {
611+
// TODO(b/394127311): Explore actually collecting metrics using the fake Cpu and Memory
612+
// metric collectors.
611613
Random random = new Random();
612614
for (int i = 0; i < count; ++i) {
613615
if (random.nextInt(2) == 0) {

0 commit comments

Comments
 (0)