@@ -861,20 +861,20 @@ public void triggerRemoteConfigFetchIfNecessary_doesNotFetchBeforeRandomDelay()
861861  }
862862
863863  @ Test 
864-   public  void  triggerRemoteConfigFetchIfNecessary_fetchesAfterAppStartRandomDelay () {
865-     long  appStartConfigFetchDelay  = 5000 ;
864+   public  void  triggerRemoteConfigFetchIfNecessary_fetchesAfterRandomDelay () {
865+     long  remoteConfigFetchDelay  = 5000 ;
866866    RemoteConfigManager  remoteConfigManagerPartialMock  =
867867        spy (
868868            setupTestRemoteConfigManager (
869869                createFakeTaskThatDoesNothing (),
870870                true ,
871871                createDefaultRcConfigMap (),
872-                 appStartConfigFetchDelay ));
872+                 remoteConfigFetchDelay ));
873873
874874    // Simulate time fast forward to 2s after fetch delay time is up 
875-     long  appStartTimeInMs  = System .currentTimeMillis ();
875+     long  approxRcmInitTimestampInMs  = System .currentTimeMillis ();
876876    when (remoteConfigManagerPartialMock .getCurrentSystemTimeMillis ())
877-         .thenReturn (appStartTimeInMs  + appStartConfigFetchDelay  + 2000 );
877+         .thenReturn (approxRcmInitTimestampInMs  + remoteConfigFetchDelay  + 2000 );
878878
879879    simulateFirebaseRemoteConfigLastFetchStatus (
880880        FirebaseRemoteConfig .LAST_FETCH_STATUS_NO_FETCH_YET );
@@ -918,19 +918,16 @@ private RemoteConfigManager setupTestRemoteConfigManager(
918918      Task <Boolean > fakeTask ,
919919      boolean  initializeFrc ,
920920      Map <String , FirebaseRemoteConfigValue > configs ,
921-       long  appStartConfigFetchDelayInMs ) {
921+       long  remoteConfigFetchDelayInMs ) {
922922    simulateFirebaseRemoteConfigLastFetchStatus (FirebaseRemoteConfig .LAST_FETCH_STATUS_SUCCESS );
923923    when (mockFirebaseRemoteConfig .fetchAndActivate ()).thenReturn (fakeTask );
924924    when (mockFirebaseRemoteConfig .getAll ()).thenReturn (configs );
925925    if  (initializeFrc ) {
926926      return  new  RemoteConfigManager (
927-           cacheManager , fakeExecutor , mockFirebaseRemoteConfig , appStartConfigFetchDelayInMs );
927+           cacheManager , fakeExecutor , mockFirebaseRemoteConfig , remoteConfigFetchDelayInMs );
928928    } else  {
929929      return  new  RemoteConfigManager (
930-           cacheManager ,
931-           fakeExecutor ,
932-           /* firebaseRemoteConfig= */  null ,
933-           appStartConfigFetchDelayInMs );
930+           cacheManager , fakeExecutor , /* firebaseRemoteConfig= */  null , remoteConfigFetchDelayInMs );
934931    }
935932  }
936933
0 commit comments