From 2b1429fe03efd7367c6d0d28f9ab9688ee166876 Mon Sep 17 00:00:00 2001 From: JianBo He Date: Thu, 10 Dec 2020 13:08:03 +0800 Subject: [PATCH] test(stomp): cover the emqx_stom_heartbeat:interval/2 --- apps/emqx_stomp/test/emqx_stomp_heartbeat_SUITE.erl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/emqx_stomp/test/emqx_stomp_heartbeat_SUITE.erl b/apps/emqx_stomp/test/emqx_stomp_heartbeat_SUITE.erl index 0d01bfcd4..b3ea25aa1 100644 --- a/apps/emqx_stomp/test/emqx_stomp_heartbeat_SUITE.erl +++ b/apps/emqx_stomp/test/emqx_stomp_heartbeat_SUITE.erl @@ -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). +