Skip to content

Commit

Permalink
test nodeUpTime metric via HTTP API
Browse files Browse the repository at this point in the history
  • Loading branch information
michalwski committed Sep 28, 2015
1 parent 4e055a9 commit 64a2cc2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/ejabberd_tests/tests/metrics_api_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ groups() ->
one_iq_error,
one_presence_error
]},
{global, [], [session_counters]}
{global, [], [session_counters,
node_uptime]}
].

init_per_suite(Config) ->
Expand Down Expand Up @@ -194,7 +195,11 @@ session_counters(Config) ->
3 = fetch_global_counter_value(nodeSessionCount, Config)
end).


node_uptime(Config) ->
X = fetch_global_counter_value(nodeUpTime, Config),
timer:sleep(timer:seconds(1)),
Y = fetch_global_counter_value(nodeUpTime, Config),
true = Y > X.
%%--------------------------------------------------------------------
%% Helpers
%%--------------------------------------------------------------------
Expand Down

0 comments on commit 64a2cc2

Please sign in to comment.