diff options
author | Matthias Radestock <matthias@rabbitmq.com> | 2013-01-22 13:58:49 +0000 |
---|---|---|
committer | Matthias Radestock <matthias@rabbitmq.com> | 2013-01-22 13:58:49 +0000 |
commit | a09d21e32b4147bab8e33a177a41fc68476e440a (patch) | |
tree | ab51b5d3f846dc1f83f18c3e4df356413c1b9207 /src/rabbit_tests.erl | |
parent | c408184ffd653dc7b52fe584b9e13f410229e142 (diff) | |
download | rabbitmq-server-a09d21e32b4147bab8e33a177a41fc68476e440a.tar.gz |
one test writer is quite enough. and make it work.bug25360
Diffstat (limited to 'src/rabbit_tests.erl')
-rw-r--r-- | src/rabbit_tests.erl | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/rabbit_tests.erl b/src/rabbit_tests.erl index 7a0ed1af..1e02ff6b 100644 --- a/src/rabbit_tests.erl +++ b/src/rabbit_tests.erl @@ -1084,16 +1084,9 @@ test_policy_validation() -> rabbit_runtime_parameters_test:unregister_policy_validator(), passed. -writer() -> - receive - {'$gen_call', From, flush} -> gen_server:reply(From, ok), - writer(); - shutdown -> ok - end. - test_server_status() -> %% create a few things so there is some useful information to list - Writer = spawn(fun writer/0), + Writer = spawn(fun test_writer/0), {ok, Ch} = rabbit_channel:start_link( 1, self(), Writer, self(), "", rabbit_framing_amqp_0_9_1, user(<<"user">>), <<"/">>, [], self(), @@ -1167,10 +1160,15 @@ test_server_status() -> passed. +test_writer() -> test_writer(none). + test_writer(Pid) -> receive - shutdown -> ok; - {send_command, Method} -> Pid ! Method, test_writer(Pid) + {'$gen_call', From, flush} -> gen_server:reply(From, ok), + test_writer(Pid); + {send_command, Method} -> Pid ! Method, + test_writer(Pid); + shutdown -> ok end. test_spawn() -> |