test(stomp): cover the emqx_stom_heartbeat:interval/2

This commit is contained in:
JianBo He 2020-12-10 13:08:03 +08:00
parent 713b4c7804
commit 2b1429fe03
1 changed files with 6 additions and 0 deletions

View File

@ -51,3 +51,9 @@ t_info(_) ->
HrtBt = emqx_stomp_heartbeat:init({100, 100}),
#{incoming := _,
outgoing := _} = emqx_stomp_heartbeat:info(HrtBt).
t_interval(_) ->
HrtBt = emqx_stomp_heartbeat:init({1, 0}),
1 = emqx_stomp_heartbeat:interval(incoming, HrtBt),
undefined = emqx_stomp_heartbeat:interval(outgoing, HrtBt).