anchor.diff:          lfm_proxy:update_times(WorkerP1, SessionId, {guid, FileGuid}, Time, Time, Time)
       end),
   
  -    Json = #{
  +    ChangesSpec = #{
           <<"triggers">> => [<<"times">>],
           <<"fileMeta">> => #{
               <<"always">> => true,
               <<"fields">> => [<<"mode">>, <<"owner">>, <<"name">>]
           }
       },
  -    {ok, AllSpaceChanges} = get_changes(Config, WorkerP1, SpaceId, Json),
  -    FileChanges = filter_changes_for_file(AllSpaceChanges, FileObjectId),
   
       % Both file_location and times docs are changed, but since only times
  -    % doc is observed only its change should trigger event
  +    % doc is observed only its change should trigger event. It is still
  +    % possible to receive several events if changes stream aggregation hasn't
  +    % occurred (time docs are created on file creation and later updated).
  +    % That is why fetching changes stream is retried ?ATTEMPTS number of times
  +    % to ensure events aggregation did happen and only one time event is observed
       ?assertMatch(
           [
               #{<<"fileMeta">> := #{
  
positive.code:         lfm_proxy:update_times(WorkerP1, SessionId, {guid, FileGuid}, Time, Time, Time)
      end),
  
      Json = #{
          <<"fileMeta">> => #{
              <<"fields">> => [<<"name">>],
              <<"always">> => true
  
negative.code:                 }
              }}
          ],
          get_changes_for_file(Config, WorkerP1, SpaceId, ChangesSpec, {object_id, FileObjectId}),
          ?ATTEMPTS
      ).
  
  
  