ソースを参照

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

JianBo He 5 年 前
コミット
2b1429fe03
1 ファイル変更6 行追加0 行削除
  1. 6 0
      apps/emqx_stomp/test/emqx_stomp_heartbeat_SUITE.erl

+ 6 - 0
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).
+