@@ -136,20 +136,6 @@ public void testOnUpdateAppStateGeneratesNewSessionIdOnBackgroundStateIfPerfSess
136136    assertThat (oldSessionId ).isNotEqualTo (testSessionManager .perfSession ().sessionId ());
137137  }
138138
139-   @ Test 
140-   public  void 
141-       testOnUpdateAppStateMakesGaugeManagerLogGaugeMetadataOnForegroundStateIfSessionIsVerbose () {
142-     forceVerboseSession ();
143- 
144-     SessionManager  testSessionManager  =
145-         new  SessionManager (mockGaugeManager , mockPerfSession , mockAppStateMonitor );
146-     testSessionManager .onUpdateAppState (ApplicationProcessState .FOREGROUND );
147- 
148-     verify (mockGaugeManager )
149-         .logGaugeMetadata (
150-             anyString (), nullable (com .google .firebase .perf .v1 .ApplicationProcessState .class ));
151-   }
152- 
153139  @ Test 
154140  public  void 
155141      testOnUpdateAppStateDoesntMakeGaugeManagerLogGaugeMetadataOnForegroundStateIfSessionIsNonVerbose () {
@@ -178,21 +164,6 @@ public void testOnUpdateAppStateGeneratesNewSessionIdOnBackgroundStateIfPerfSess
178164            anyString (), nullable (com .google .firebase .perf .v1 .ApplicationProcessState .class ));
179165  }
180166
181-   @ Test 
182-   public  void 
183-       testOnUpdateAppStateMakesGaugeManagerLogGaugeMetadataOnBackgroundAppStateIfSessionIsVerboseAndTimedOut () {
184-     when (mockPerfSession .isSessionRunningTooLong ()).thenReturn (true );
185-     forceVerboseSession ();
186- 
187-     SessionManager  testSessionManager  =
188-         new  SessionManager (mockGaugeManager , mockPerfSession , mockAppStateMonitor );
189-     testSessionManager .onUpdateAppState (ApplicationProcessState .BACKGROUND );
190- 
191-     verify (mockGaugeManager )
192-         .logGaugeMetadata (
193-             anyString (), nullable (com .google .firebase .perf .v1 .ApplicationProcessState .class ));
194-   }
195- 
196167  @ Test 
197168  public  void  testOnUpdateAppStateMakesGaugeManagerStartCollectingGaugesIfSessionIsVerbose () {
198169    forceVerboseSession ();
@@ -232,32 +203,6 @@ public void testOnUpdateAppStateMakesGaugeManagerStopCollectingGaugesWhenSession
232203    verify (mockGaugeManager ).stopCollectingGauges ();
233204  }
234205
235-   @ Test 
236-   public  void  testGaugeMetadataIsFlushedOnlyWhenNewVerboseSessionIsCreated () {
237-     when (mockPerfSession .isSessionRunningTooLong ()).thenReturn (false );
238- 
239-     // Start with a non verbose session 
240-     forceNonVerboseSession ();
241-     SessionManager  testSessionManager  =
242-         new  SessionManager (
243-             mockGaugeManager , PerfSession .createWithId ("testSessionId1" ), mockAppStateMonitor );
244- 
245-     verify (mockGaugeManager , times (0 ))
246-         .logGaugeMetadata (
247-             eq ("testSessionId1" ),
248-             eq (com .google .firebase .perf .v1 .ApplicationProcessState .FOREGROUND ));
249- 
250-     // Forcing a verbose session will enable Gauge collection 
251-     forceVerboseSession ();
252-     testSessionManager .updatePerfSession (PerfSession .createWithId ("testSessionId2" ));
253-     verify (mockGaugeManager , times (1 )).logGaugeMetadata (eq ("testSessionId2" ), any ());
254- 
255-     // Force a non-verbose session and verify if we are not logging metadata 
256-     forceVerboseSession ();
257-     testSessionManager .updatePerfSession (PerfSession .createWithId ("testSessionId3" ));
258-     verify (mockGaugeManager , times (1 )).logGaugeMetadata (eq ("testSessionId3" ), any ());
259-   }
260- 
261206  @ Test 
262207  public  void  testSessionIdDoesNotUpdateIfPerfSessionRunsTooLong () {
263208    Timer  mockTimer  = mock (Timer .class );
0 commit comments