|
44 | 44 | import java.util.Random; |
45 | 45 | import java.util.concurrent.TimeUnit; |
46 | 46 | import org.junit.Before; |
47 | | -import org.junit.Ignore; |
48 | 47 | import org.junit.Test; |
49 | 48 | import org.junit.runner.RunWith; |
50 | 49 | import org.mockito.ArgumentCaptor; |
@@ -439,39 +438,6 @@ public void testStopCollectingGaugesCreatesOneLastJobToConsumeAnyPendingMetrics( |
439 | 438 | testSessionId(1), recordedGaugeMetric, fakeMemoryMetricReading); |
440 | 439 | } |
441 | 440 |
|
442 | | - @Test |
443 | | - @Ignore // TODO(b/394127311): Update test for GaugeCounter. |
444 | | - public void testGaugeManagerClearsTheQueueEachRun() { |
445 | | - PerfSession fakeSession = createTestSession(1); |
446 | | - |
447 | | - testGaugeManager.startCollectingGauges(fakeSession); |
448 | | - |
449 | | - fakeCpuGaugeCollector.cpuMetricReadings.add(createFakeCpuMetricReading(200, 100)); |
450 | | - fakeCpuGaugeCollector.cpuMetricReadings.add(createFakeCpuMetricReading(300, 400)); |
451 | | - fakeMemoryGaugeCollector.memoryMetricReadings.add( |
452 | | - createFakeAndroidMetricReading(/* currentUsedAppJavaHeapMemoryKb= */ 1234)); |
453 | | - |
454 | | - assertThat(fakeCpuGaugeCollector.cpuMetricReadings).isNotEmpty(); |
455 | | - assertThat(fakeMemoryGaugeCollector.memoryMetricReadings).isNotEmpty(); |
456 | | - |
457 | | - fakeScheduledExecutorService.simulateSleepExecutingAtMostOneTask(); |
458 | | - assertThat(fakeCpuGaugeCollector.cpuMetricReadings).isEmpty(); |
459 | | - assertThat(fakeMemoryGaugeCollector.memoryMetricReadings).isEmpty(); |
460 | | - |
461 | | - fakeCpuGaugeCollector.cpuMetricReadings.add(createFakeCpuMetricReading(200, 100)); |
462 | | - fakeMemoryGaugeCollector.memoryMetricReadings.add( |
463 | | - createFakeAndroidMetricReading(/* currentUsedAppJavaHeapMemoryKb= */ 1234)); |
464 | | - fakeMemoryGaugeCollector.memoryMetricReadings.add( |
465 | | - createFakeAndroidMetricReading(/* currentUsedAppJavaHeapMemoryKb= */ 2345)); |
466 | | - |
467 | | - assertThat(fakeCpuGaugeCollector.cpuMetricReadings).isNotEmpty(); |
468 | | - assertThat(fakeMemoryGaugeCollector.memoryMetricReadings).isNotEmpty(); |
469 | | - |
470 | | - fakeScheduledExecutorService.simulateSleepExecutingAtMostOneTask(); |
471 | | - assertThat(fakeCpuGaugeCollector.cpuMetricReadings).isEmpty(); |
472 | | - assertThat(fakeMemoryGaugeCollector.memoryMetricReadings).isEmpty(); |
473 | | - } |
474 | | - |
475 | 441 | @Test |
476 | 442 | public void testLogGaugeMetadataSendDataToTransport() { |
477 | 443 | when(fakeGaugeMetadataManager.getDeviceRamSizeKb()).thenReturn(2000); |
|
0 commit comments