File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
firebase-perf/src/test/java/com/google/firebase/perf/session/gauges Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 27
27
import static org .mockito .Mockito .times ;
28
28
import static org .mockito .Mockito .verify ;
29
29
import static org .mockito .Mockito .when ;
30
+ import static org .robolectric .Shadows .shadowOf ;
30
31
32
+ import android .os .Looper ;
31
33
import androidx .test .core .app .ApplicationProvider ;
32
34
import com .google .firebase .components .Lazy ;
33
35
import com .google .firebase .perf .FirebasePerformanceTestBase ;
@@ -344,6 +346,7 @@ public void testGaugeCounterStartsAJobToConsumeTheGeneratedMetrics() {
344
346
.isEqualTo (TIME_TO_WAIT_BEFORE_FLUSHING_GAUGES_QUEUE_MS );
345
347
346
348
fakeScheduledExecutorService .simulateSleepExecutingAtMostOneTask ();
349
+ shadowOf (Looper .getMainLooper ()).idle ();
347
350
348
351
// Generate additional metrics, but doesn't start logging them as it hasn't met the threshold.
349
352
generateMetricsAndIncrementCounter (5 );
You can’t perform that action at this time.
0 commit comments