anchor.diff:      timer:sleep(100),
       {0,0,0,1,1} = vmq_queue_sup_sup:summary(),
       {ok, Socket1} = packet:do_client_connect(Connect2, Connack, []),
  -    disable_on_publish(),
  -    disable_on_subscribe(),
       ok = gen_tcp:close(Socket1),
       timer:sleep(100),
       %% if queue cleanup woudln't have happen, we'd see a remaining offline message
       {0,0,0,0,0} = vmq_queue_sup_sup:summary().
   
  -session_present_test(_) ->
  -    Connect = packet:gen_connect("clean-sesspres-test", [{keepalive,10}, {clean_session, false}]),
  +session_present_test(Cfg) ->
  +    Connect = packet:gen_connect(vmq_cth:ustr(Cfg) ++ "clean-sesspres-test", [{keepalive,10}, {clean_session, false}]),
       ConnackSessionPresentFalse = packet:gen_connack(false, 0),
       ConnackSessionPresentTrue = packet:gen_connack(true, 0),
   
  
positive.code:     {ok, Socket2} = packet:do_client_connect(Connect, ConnackSessionPresentTrue, []),
      ok = gen_tcp:close(Socket2).
  
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  %%% Hooks (as explicit as possible)
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  hook_auth_on_subscribe(_,{"", <<"clean-qos1-test">>}, [{[<<"qos1">>, <<"clean_session">>, <<"test">>],1}]) -> ok.
  
  hook_auth_on_publish(_, _, _MsgId, [<<"qos1">>,<<"clean_session">>,<<"test">>], <<"clean-session-message">>, false) -> ok.
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  %%% Helper
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  
negative.code: -module(vmq_clean_session_SUITE).
  
  -compile(export_all).
  -compile(nowarn_export_all).
  
  %% ===================================================================
  %% common_test callbacks
  %% ===================================================================
  init_per_suite(Config) ->
      cover:start(),
      [{ct_hooks, vmq_cth} | Config].
  
  
  end_per_suite(_Config) ->
      _Config.
  