anchor.diff:                                                 {leases, true},
                                                  {db_backend, db_mnesia},
                                                  {start_type, recover}]}]),
  -  util:wait_for(fun admin:check_leases/0),
  +  lease_checker2:wait_for_clean_leases(500, 4),
     true.
   
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
positive.code: init_per_group(remove_node = Group, Config) ->
      unittest_helper:init_per_group(Group, Config);
  init_per_group(Group, Config) ->
      %% stop ring and clean repository from previous test case (it may have run into a timeout)
      unittest_helper:stop_ring(),
      _ = application:stop(mnesia),
  
negative.code: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  write(_Config) ->
    % write data to KV
    lease_checker2:get_kv_db(),
    _ = [kv_on_cseq:write(integer_to_list(X),X) || X <- lists:seq(1, 100)],
    lease_checker2:get_kv_db(),
    ok.
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  % test read/1 ensure data integrity after recovery
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  read(Config) ->
    {priv_dir, PrivDir} = lists:keyfind(priv_dir, 1, Config),
    lease_checker2:get_kv_db(),
    unittest_helper:stop_ring(),
    % wait for leases to expire
    timer:sleep(11000),
  