anchor.diff:  leave_until(CurrentSize, TargetSize) ->
       Group = pid_groups:group_with(dht_node),
       Node = pid_groups:pid_of(Group, dht_node),
  -    ct:pal("shuting down node: ~w ~w", [Group, Node]),
  -    ok = api_vm:shutdown_node(Group),
  +    ct:pal("shuting down node: ~s ~w", [Group, Node]),
  +    ok = api_vm:kill_node(Group),
       lease_helper:wait_for_ring_size(CurrentSize - 1),
       ct:pal("have correct ring size ~w", [Node]),
  -    lease_helper:wait_for_correct_ring(),
  -    ct:pal("have correct ring ~w", [Node]),
  -    lease_helper:wait_for_correct_leases(CurrentSize - 1),
  +    log:log("wait for ring to stabilize in shutdown"),
  +    util:wait_for(fun admin:check_leases/0, 10000),
       ct:pal("shuting down node: success"),
       leave_until(CurrentSize - 1, TargetSize).
   
  
positive.code:     api_vm:add_nodes(1),
      log:log("wait for ring size ~w", [TargetSize]),
      lease_helper:wait_for_ring_size(TargetSize),
      log:log("wait for correct ring"),
      lease_helper:wait_for_correct_ring(),
      log:log("wait for correct leases ~w", [TargetSize]),
      lease_helper:wait_for_correct_leases(TargetSize).
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  %
  
negative.code:                                test_quadruple_join
                                 ]},
       {join_and_leave_tests, [sequence], [
                                           test_quadruple_join_single_leave%,
                                           %%  the following tests can
                                           %%  run into timeouts if the
                                           %%  majority of replicas of a
                                           %%  lease have left
                                           %%  %test_quadruple_join_double_leave,
                                           %%  %test_quadruple_join_triple_leave,
                                           %%  %test_quadruple_join_quadruple_leave
                                           ]}
      ].
  
  