anchor.diff:      timer:sleep(50),
       DhtNodes = pid_groups:find_all(dht_node),
       VerifyFun =
  -        fun (Result1, Result2) ->
  +        fun (Result1, Result2, Interleaved) ->
                   unittest_helper:check_ring_load(440),
                   unittest_helper:check_ring_data(),
                   %% Outcome: at most one slide may succeed.
  -                %% Currently, breakpoints can't be used with the proto scheduler. This possibly
  -                %% can lead to a sequential processing of the slides, i.e. first slide finishes
  -                %% before the second slide starts. Hence, for now, we need to also allow both
  -                %% slides to return OK.
  -                %% TODO: ?assert(not(element(4, Result1) =:= ok andalso element(4, Result2) =:= ok))
  -                Vals = [ok, ongoing_slide, target_id_not_in_range, wrong_pred_succ_node],
  -                ?assert(lists:member(element(4, Result1), Vals)),
  -                ?assert(lists:member(element(4, Result2), Vals))
  +                %% We ensure slide interleaving using breakpoints. When using the proto scheduler
  +                %% we test for interleaving as we cannot use breakpoints.
  +                case Interleaved of
  +                    true ->
  +                        ?assert(not(Result1 =:= ok andalso Result2 =:= ok));
  +                    false ->
  +                        Vals = [ok, ongoing_slide, target_id_not_in_range, wrong_pred_succ_node],
  +                        ?assert(lists:member(Result1, Vals)),
  +                        ?assert(lists:member(Result2, Vals))
  +                end
           end,
       Actions = [
                  {
  
positive.code:     % make sure all keys have been created...
      timer:sleep(50),
      VerifyFun =
          fun(Result1, Result2) ->
                  unittest_helper:check_ring_load(440),
                  unittest_helper:check_ring_data(),
                  %% both slides should be successfull
                  ?assert(element(4, Result1) =:= ok andalso element(4, Result2) =:= ok
                          orelse %% rarely, one slides fails because the neighbor information hasn't been updated yet
                            (element(4, Result1) =:= wrong_pred_succ_node) xor (element(4, Result2) =:= wrong_pred_succ_node))
          end,
      Actions =
          [{
  
negative.code:         end,
      element(N, Nodes).
  
  get_node_details(DhtNode) ->
      comm:send(comm:make_global(DhtNode), {get_node_details, comm:this(), [node, pred, succ]}),
      receive
          ?SCALARIS_RECV({get_node_details_response, NodeDetails},
                         begin
                             Node = node_details:get(NodeDetails, node),
                             Pred = node_details:get(NodeDetails, pred),
                             Succ = node_details:get(NodeDetails, succ),
                             {Pred, Node, Succ}
                         end)
          end.
  
  -spec get_predspred_pred_node_succ(DhtNode::pid()) -> node_tuple().
  get_predspred_pred_node_succ(DhtNode) ->
      {Pred, Node, Succ} = get_node_details(DhtNode),
      {PredsPred, _Pred2, _Node2} = get_node_details(node:pidX(Pred)),
      {PredsPred, Pred, Node, Succ}.
  
  -spec set_breakpoint(Pid::pid(), gen_component:bp_name()) -> ok.
  set_breakpoint(Pid, Tag) ->
      gen_component:bp_set(Pid, move, Tag),
      gen_component:bp_barrier(Pid).
  
  wait(Pid, Tag) ->
      gen_component:bp_del(Pid, Tag).
  
  continue(Pid) ->
      gen_component:bp_cont(Pid).
  
  -spec proto_sched_callback_fun() -> proto_sched:callback_on_deliver().
  proto_sched_callback_fun() ->
      This = self(),
      fun(_From, _To, Msg) ->
              case Msg of
                  {move, start_slide, _, _, Tag, _} -> comm:send_local(This, {begin_of_slide, Tag});
                  {move, result, Tag, _Result}      -> comm:send_local(This, {end_of_slide,   Tag});
                  _    -> ok
              end
      end.
  
  receive_result() ->
      receive
          ?SCALARIS_RECV(X, X)
      end.
  
  %% check for interleaving of slides using
  %% FIFO properties of erlang message channels
  -spec slide_interleaving() -> boolean().
  slide_interleaving() ->
      case proto_sched:infected() of
          false -> true;
          true  ->
              %% first message
              {begin_of_slide, Tag} = receive_result(),
              %% next message
              Result =
                  case receive_result() of
                      {end_of_slide, Tag}     -> false;
                      {begin_of_slide, _Tag2} -> true
                  end,
              %% clear pending messages
              _ = receive_result(),
              _ = receive_result(),
              Result
      end.
  
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  