chore(tests): fix conunt error
This commit is contained in:
parent
992e094ce9
commit
ff96250b0b
|
@ -192,19 +192,19 @@ t_shard(_) ->
|
||||||
ok = meck:unload(emqx_broker_helper).
|
ok = meck:unload(emqx_broker_helper).
|
||||||
|
|
||||||
t_stats_fun(_) ->
|
t_stats_fun(_) ->
|
||||||
?assertEqual(0, emqx_stats:getstat('subscribers.count')),
|
N = emqx_stats:getstat('subscribers.count'),
|
||||||
?assertEqual(0, emqx_stats:getstat('subscriptions.count')),
|
N = emqx_stats:getstat('subscriptions.count'),
|
||||||
?assertEqual(0, emqx_stats:getstat('suboptions.count')),
|
N = emqx_stats:getstat('suboptions.count'),
|
||||||
ok = emqx_broker:subscribe(<<"topic">>, <<"clientid">>),
|
ok = emqx_broker:subscribe(<<"topic">>, <<"clientid">>),
|
||||||
ok = emqx_broker:subscribe(<<"topic2">>, <<"clientid">>),
|
ok = emqx_broker:subscribe(<<"topic2">>, <<"clientid">>),
|
||||||
emqx_broker:stats_fun(),
|
emqx_broker:stats_fun(),
|
||||||
ct:sleep(10),
|
ct:sleep(10),
|
||||||
?assertEqual(2, emqx_stats:getstat('subscribers.count')),
|
?assertEqual(N + 2, emqx_stats:getstat('subscribers.count')),
|
||||||
?assertEqual(2, emqx_stats:getstat('subscribers.max')),
|
?assertEqual(N + 2, emqx_stats:getstat('subscribers.max')),
|
||||||
?assertEqual(2, emqx_stats:getstat('subscriptions.count')),
|
?assertEqual(N + 2, emqx_stats:getstat('subscriptions.count')),
|
||||||
?assertEqual(2, emqx_stats:getstat('subscriptions.max')),
|
?assertEqual(N + 2, emqx_stats:getstat('subscriptions.max')),
|
||||||
?assertEqual(2, emqx_stats:getstat('suboptions.count')),
|
?assertEqual(N + 2, emqx_stats:getstat('suboptions.count')),
|
||||||
?assertEqual(2, emqx_stats:getstat('suboptions.max')).
|
?assertEqual(N + 2, emqx_stats:getstat('suboptions.max')).
|
||||||
|
|
||||||
recv_msgs(Count) ->
|
recv_msgs(Count) ->
|
||||||
recv_msgs(Count, []).
|
recv_msgs(Count, []).
|
||||||
|
|
Loading…
Reference in New Issue