anchor.diff:                      ok
                   end),
       Id.
  +
  +%% start_server starts a listener and hands the port over, whereas
  +%% with_tcp_server starts a real TCP server good for one request being accepted
  +start_server(_Config) ->
  +    {ok, Listen} = gen_tcp:listen(?PORT, [binary, {active,false}, {reuseaddr,true}]),
  +    Listen.
  +
  +stop_server(Config) ->
  +    Port = ?config(port, Config),
  +    catch gen_tcp:close(Port).
  +
  +with_tcp_server(Config) ->
  +    Self = self(),
  +    Server = fun() ->
  +        {ok, Listen} = gen_tcp:listen(0,[]),
  +        {ok, Port} = inet:port(Listen),
  +        Self ! {endpoint, self(), {{127,0,0,1}, Port}},
  +        {ok, _Accept} = gen_tcp:accept(Listen),
  +        timer:sleep(infinity)
  +    end,
  +    Pid = spawn_link(Server),
  +    receive
  +        {endpoint, Pid, {Ip, Port}} ->
  +            [{endpoint, {Pid, Ip, Port}},
  +             {channel, 1337} | Config]
  +    after 5000 ->
  +        error(bad_server)
  +    end.
  +
  +end_tcp_server(Config) ->
  +    {Pid, _, _} = ?config(endpoint, Config),
  +    unlink(Pid),
  +    exit(Pid, kill),
  +    Config.
   
   
   %%%%%%%%%%%%%
  
positive.code:                end),
      {ok, Sock} = gen_tcp:accept(Listen, 5000),
      Logs = receive_logs(Sock, 7),
      ct:pal("Res: ~p",[Logs]),
      {match, _} = re:run(Logs, "mymsg1"),
      nomatch    = re:run(Logs, "mymsg2"),
      {match, _} = re:run(Logs, "L10.*1 messages? dropped"),
  
negative.code: -define(PORT, 9601).
  -define(DRAIN_BUFFER_SIZE,5).
  
  all() -> [full_stack, {group, with_tcp_server}].
  
  groups() -> [{with_tcp_server,[],[shrink]}].
  
  %%%%%%%%%%%%%%%%%%%%%%%
  %%% SETUP / TEADOWN %%%
  