anchor.diff:      timer:sleep(100), % adding indices takes some time 
       Name = doko_index_sup:name(Index),
       {Result1,[]} = rpc:multicall(Nodes, erlang, whereis, [Name]),
  -    0 = length([X||X <- Result1, X == undefined]),
  +    0 = length([X || X <- Result1, X == undefined]),
       %% del index
       ok = rpc:call(random(Nodes), doko_cluster, del_index, [Index]),
       timer:sleep(100), % deleting indices takes some time 
       {Result2,[]} = rpc:multicall(Nodes, erlang, whereis, [Name]),
       Length = length(Nodes),
  -    Length = length([X||X <- Result2, X == undefined]),
  +    Length = length([X || X <- Result2, X == undefined]),
       %% add it again
       ok = rpc:call(random(Nodes), doko_cluster, add_index, [Index, en]),
       Name = doko_index_sup:name(Index),
       timer:sleep(100), % adding indices takes some time 
       {Result3,[]} = rpc:multicall(Nodes, erlang, whereis, [Name]),
  -    0 = length([X||X <- Result3, X == undefined]),
  +    0 = length([X || X <- Result3, X == undefined]),
       %% done
       ok.
   
  
positive.code:     [{group,systest}].
  
  groups() ->
      [{systest,[shuffle,sequence,{repeat,8}],[test_del_doc,
                                               test_del_index,
                                               test_node_data_persistent,
                                               test_queries,
                                               test_redundancy,
                                               test_replication]}].
  
  init_per_suite(Config) ->
      Nodes = test_nodes(),
  
negative.code: %% Tests
  %%----------------------------------------------------------------------------
  
  test_del_doc(_Config) ->
      Nodes = test_nodes(),
      %% add index
      Index = "index",
      ok = rpc:call(random(Nodes), doko_cluster, add_index, [Index, en]),
      %% add document
      Doc1 = doko_doc:new(1, [{"body", <<"hello world">>}], en),
      ok = rpc:call(random(Nodes), doko_cluster, add_doc, [Index, Doc1]),
      %% execute query and check result
      ExecQuery = fun () ->
                          rpc:call(random(Nodes),
                                   doko_query, execute, [Index, <<"'hello'">>])
                  end,
      [1] = gb_sets:to_list(ExecQuery()),
      %% delete document
      ok = rpc:call(random(Nodes), doko_cluster, del_doc, [Index, Doc1]),
      timer:sleep(100),
      %% execute query and check result
      true = gb_sets:is_empty(ExecQuery()),
      ok.
  
  test_del_index(_Config) ->
  