Don't assume stats tables are empty

We don't need them to be; what we care about is that
in this particular test, no new entries are inserted.
This commit is contained in:
Michael Klishin 2017-01-25 22:15:39 +03:00
parent 12f91458f0
commit c70a8d3a97
1 changed files with 3 additions and 2 deletions

View File

@ -111,13 +111,14 @@ block(Config) ->
emqttc:disconnect(C).
handle_invalid_frames(Config) ->
N = rpc(Config, ets, info, [connection_metrics, size]),
P = rabbit_ct_broker_helpers:get_node_config(Config, 0, tcp_port_mqtt),
{ok, C} = gen_tcp:connect("localhost", P, []),
Bin = <<"GET / HTTP/1.1\r\nHost: www.rabbitmq.com\r\nUser-Agent: curl/7.43.0\r\nAccept: */*">>,
gen_tcp:send(C, Bin),
gen_tcp:close(C),
%% Stats shouldn't be notified as connection pid is undefined
0 = rpc(Config, ets, info, [connection_metrics, size]).
%% No new stats entries should be inserted as connection never got to initialize
N = rpc(Config, ets, info, [connection_metrics, size]).
expect_publishes(_Topic, []) -> ok;