test(monitor): verify historical and current metrics are consistent

This commit is contained in:
Andrew Mayorov 2024-05-24 14:56:10 +02:00
parent fd9655bc35
commit c30b881239
No known key found for this signature in database
GPG Key ID: 2837C62ACFBFED5D
1 changed files with 15 additions and 0 deletions

View File

@ -429,6 +429,21 @@ t_persistent_session_stats(Config) ->
?ON(N1, request(["monitor_current"]))
)
end),
%% Verify that historical metrics are in line with the current ones.
?assertMatch(
{ok, [
#{
<<"time_stamp">> := _,
<<"connections">> := 3,
<<"disconnected_durable_sessions">> := 1,
<<"topics">> := 8,
<<"subscriptions">> := 8,
<<"subscriptions_ram">> := 4,
<<"subscriptions_durable">> := 4
}
]},
?ON(N1, request(["monitor"], "latest=1"))
),
{ok, {ok, _}} =
?wait_async_action(
emqtt:disconnect(PSClient2),