anchor.diff:      end
     end,
     lists:foreach(StartAdditionalWorker, NodesUp),
  -  test_utils:wait_for_cluster_init(length(NodesUp) - 1),
  +  nodes_manager:wait_for_cluster_init(length(NodesUp) - 1),
   
     {ConAns, Socket} = gen_tcp:connect(Host, DNS_Port, [{active, false}, binary, {packet, 2}]),
     ?assertEqual(ok, ConAns),
  
positive.code:   Host = get_host(CCM),
  
    ?assertEqual(ok, rpc:call(CCM, ?MODULE, ccm_code1, [])),
    test_utils:wait_for_cluster_cast(),
    RunWorkerCode = fun(Node) ->
      ?assertEqual(ok, rpc:call(Node, ?MODULE, worker_code, [])),
      test_utils:wait_for_cluster_cast({?Node_Manager_Name, Node})
    end,
    lists:foreach(RunWorkerCode, WorkerNodes),
    ?assertEqual(ok, rpc:call(CCM, ?MODULE, ccm_code2, [])),
    test_utils:wait_for_cluster_init(),
  
    {Workers, _} = gen_server:call({global, ?CCM}, get_workers, 1000),
    StartAdditionalWorker = fun(Node) ->
  
negative.code: %% ====================================================================
  
  init_per_testcase(distributed_test, Config) ->
    ?INIT_DIST_TEST,
    nodes_manager:start_deps_for_tester_node(),
  
    NodesUp = nodes_manager:start_test_on_nodes(4),
    [CCM | _] = NodesUp,
    DBNode = nodes_manager:get_db_node(),
  
    StartLog = nodes_manager:start_app_on_nodes(NodesUp, [
      [{node_type, ccm_test}, {dispatcher_port, 5055}, {control_panel_port, 1350}, {control_panel_redirect_port, 1354}, {rest_port, 8443}, {ccm_nodes, [CCM]}, {dns_port, 1308}, {db_nodes, [DBNode]}, {heart_beat, 1}],
      [{node_type, worker}, {dispatcher_port, 6666}, {control_panel_port, 1351}, {control_panel_redirect_port, 1355}, {rest_port, 8444}, {ccm_nodes, [CCM]}, {dns_port, 1308}, {db_nodes, [DBNode]}, {heart_beat, 1}],
      [{node_type, worker}, {dispatcher_port, 7777}, {control_panel_port, 1352}, {control_panel_redirect_port, 1356}, {rest_port, 8445}, {ccm_nodes, [CCM]}, {dns_port, 1308}, {db_nodes, [DBNode]}, {heart_beat, 1}],
      [{node_type, worker}, {dispatcher_port, 8888}, {control_panel_port, 1353}, {control_panel_redirect_port, 1357}, {rest_port, 8446}, {ccm_nodes, [CCM]}, {dns_port, 1308}, {db_nodes, [DBNode]}, {heart_beat, 1}]]),
  
    Assertions = [{false, lists:member(error, NodesUp)}, {false, lists:member(error, StartLog)}],
    lists:append([{nodes, NodesUp}, {assertions, Assertions}], Config);
  
  init_per_testcase(_, Config) ->
    ?INIT_DIST_TEST,
  
    NodesUp = nodes_manager:start_test_on_nodes(1),
    [Node | _] = NodesUp,
  
    DNS_Port = 1312,
    Env = [{node_type, ccm_test}, {dispatcher_port, 6666}, {ccm_nodes, [Node]}, {dns_port, DNS_Port}, {heart_beat, 1}],
  
    StartLog = nodes_manager:start_app_on_nodes(NodesUp, [Env]),
  
    Assertions = [{false, lists:member(error, NodesUp)}, {false, lists:member(error, StartLog)}],
    lists:append([{dns_port, DNS_Port}, {nodes, NodesUp}, {assertions, Assertions}], Config).
  
  
  end_per_testcase(distributed_test, Config) ->
    Nodes = ?config(nodes, Config),
    StopLog = nodes_manager:stop_app_on_nodes(Nodes),
    StopAns = nodes_manager:stop_nodes(Nodes),
    nodes_manager:stop_deps_for_tester_node(),
  
    ?assertEqual(false, lists:member(error, StopLog)),
    ?assertEqual(ok, StopAns);
  
  end_per_testcase(_, Config) ->
    Nodes = ?config(nodes, Config),
    StopLog = nodes_manager:stop_app_on_nodes(Nodes),
    StopAns = nodes_manager:stop_nodes(Nodes),
  
    ?assertEqual(false, lists:member(error, StopLog)),
    ?assertEqual(ok, StopAns).
  
  %% ====================================================================
  %% Helping functions
  