@@ -136,20 +136,6 @@ public void testOnUpdateAppStateGeneratesNewSessionIdOnBackgroundStateIfPerfSess
136
136
assertThat (oldSessionId ).isNotEqualTo (testSessionManager .perfSession ().sessionId ());
137
137
}
138
138
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
-
153
139
@ Test
154
140
public void
155
141
testOnUpdateAppStateDoesntMakeGaugeManagerLogGaugeMetadataOnForegroundStateIfSessionIsNonVerbose () {
@@ -178,21 +164,6 @@ public void testOnUpdateAppStateGeneratesNewSessionIdOnBackgroundStateIfPerfSess
178
164
anyString (), nullable (com .google .firebase .perf .v1 .ApplicationProcessState .class ));
179
165
}
180
166
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
-
196
167
@ Test
197
168
public void testOnUpdateAppStateMakesGaugeManagerStartCollectingGaugesIfSessionIsVerbose () {
198
169
forceVerboseSession ();
@@ -232,32 +203,6 @@ public void testOnUpdateAppStateMakesGaugeManagerStopCollectingGaugesWhenSession
232
203
verify (mockGaugeManager ).stopCollectingGauges ();
233
204
}
234
205
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
-
261
206
@ Test
262
207
public void testSessionIdDoesNotUpdateIfPerfSessionRunsTooLong () {
263
208
Timer mockTimer = mock (Timer .class );
0 commit comments