anchor.diff:           create_users/2,
            freshen_specs/2,
            freshen_spec/2,
  +         work_on_deleting_users/3, % used by wpool worker
            create_fresh_user/2]).
   -export([start/1,
            stop/1,
  
positive.code:     nasty_global_table() ! bye.
  clean() ->
      wpool:start_sup_pool(unregister_pool, [{workers, 10},
                                             {overrun_warning, 3000},
                                             {one_for_one, 3, 2}]), % if it dies 3 times in last 2 seconds, we fail
      L = ets:tab2list(nasty_global_table()),
      [wpool:cast(unregister_pool, {?MODULE, delete_users, [El]}, available_worker) || El <- tag(L)],
      ets:delete_all_objects(nasty_global_table()),
      ok.
  
  %%% Internals
  nasty_global_table() -> escalus_fresh_db.
  
  delete_users({_Suffix, Conf}) ->
      ct:pal("Deleting users..."),
      Plist = proplists:get_value(escalus_users, Conf),
      escalus_users:delete_users(Conf, Plist),
      ok.
  
  ensure_table_present(T) ->
      RunDB = fun() -> ets:new(T, [named_table, public]),
  
negative.code:     list_to_binary(L).
  
  
  tag(L) -> lists:zip(lists:seq(1, length(L)), L).
  