Skip to content

Commit

Permalink
more instrumentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulf Wiger committed Mar 21, 2011
1 parent fec2da6 commit 5d970e4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/jobs_tests.erl
Expand Up @@ -21,8 +21,9 @@ dist_test_() ->
{foreach,
fun() ->
Remote = start_slave(Name),
rpc:call(Remote, ?MODULE, with_msg_sampler, [Rate]),
with_msg_sampler(Rate),
?assertEqual(Rate,
rpc:call(Remote, ?MODULE, with_msg_sampler, [Rate])),
?assertEqual(Rate, with_msg_sampler(Rate)),
{Remote, Rate}
end,
fun({Remote, _}) ->
Expand All @@ -38,7 +39,7 @@ dist_test_() ->

with_msg_sampler(Rate) ->
application:unload(jobs),
application:load(jobs),
ok = application:load(jobs),
[application:set_env(jobs, K, V) ||
{K,V} <- [{queues, [{q, [{regulators,
[{rate, [
Expand All @@ -52,7 +53,7 @@ with_msg_sampler(Rate) ->
]}
]
],
application:start(jobs),
ok = application:start(jobs),
Rate.

start_slave(Name) ->
Expand Down

0 comments on commit 5d970e4

Please sign in to comment.