diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2011-08-16 11:37:41 +0100 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2011-08-16 11:37:41 +0100 |
| commit | b384571346491b87b77609fe50dfc6cccd25e831 (patch) | |
| tree | 0a922f1ab53c537f44db6f77641e69128925b1d3 /src | |
| parent | 314074f8e8f8c01cdb6843773b6999830cf99cf6 (diff) | |
| download | rabbitmq-server-git-b384571346491b87b77609fe50dfc6cccd25e831.tar.gz | |
Move these back where they should be...
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_tests.erl | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/rabbit_tests.erl b/src/rabbit_tests.erl index 180c19f5bb..e02b862db0 100644 --- a/src/rabbit_tests.erl +++ b/src/rabbit_tests.erl @@ -1304,25 +1304,6 @@ user(Username) -> impl = #internal_user{username = Username, tags = [administrator]}}. -test_statistics_event_receiver(Pid) -> - receive - Foo -> Pid ! Foo, test_statistics_event_receiver(Pid) - end. - -test_statistics_receive_event(Ch, Matcher) -> - rabbit_channel:flush(Ch), - Ch ! emit_stats, - test_statistics_receive_event1(Ch, Matcher). - -test_statistics_receive_event1(Ch, Matcher) -> - receive #event{type = channel_stats, props = Props} -> - case Matcher(Props) of - true -> Props; - _ -> test_statistics_receive_event1(Ch, Matcher) - end - after 1000 -> throw(failed_to_receive_event) - end. - test_confirms() -> {_Writer, Ch} = test_spawn(), DeclareBindDurableQueue = @@ -1383,6 +1364,25 @@ test_confirms() -> passed. +test_statistics_event_receiver(Pid) -> + receive + Foo -> Pid ! Foo, test_statistics_event_receiver(Pid) + end. + +test_statistics_receive_event(Ch, Matcher) -> + rabbit_channel:flush(Ch), + Ch ! emit_stats, + test_statistics_receive_event1(Ch, Matcher). + +test_statistics_receive_event1(Ch, Matcher) -> + receive #event{type = channel_stats, props = Props} -> + case Matcher(Props) of + true -> Props; + _ -> test_statistics_receive_event1(Ch, Matcher) + end + after 1000 -> throw(failed_to_receive_event) + end. + test_statistics() -> application:set_env(rabbit, collect_statistics, fine), |
