diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2012-01-18 11:33:25 +0000 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2012-01-18 11:33:25 +0000 |
| commit | 1d43ea4a18f534329161934af1d380ce5fcd94bc (patch) | |
| tree | 16751f879f25e79c818fd02f8bee21a9018d4d56 /src | |
| parent | afa6d34a55ae93b61e2584dbf2f0d2ee1b38ab96 (diff) | |
| download | rabbitmq-server-git-1d43ea4a18f534329161934af1d380ce5fcd94bc.tar.gz | |
Ignore bump_credit messages in rabbit_tests.
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_tests.erl | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/src/rabbit_tests.erl b/src/rabbit_tests.erl index 9afb95b98f..7205a99f0d 100644 --- a/src/rabbit_tests.erl +++ b/src/rabbit_tests.erl @@ -2222,14 +2222,25 @@ test_amqqueue(Durable) -> #amqqueue { durable = Durable }. with_fresh_variable_queue(Fun) -> - ok = empty_test_queue(), - VQ = variable_queue_init(test_amqqueue(true), false), - S0 = rabbit_variable_queue:status(VQ), - assert_props(S0, [{q1, 0}, {q2, 0}, - {delta, {delta, undefined, 0, undefined}}, - {q3, 0}, {q4, 0}, - {len, 0}]), - _ = rabbit_variable_queue:delete_and_terminate(shutdown, Fun(VQ)), + Ref = make_ref(), + Me = self(), + %% Run in a separate process since rabbit_variable_queue will send + %% bump_credit messages and we want to ignore them + spawn(fun() -> + ok = empty_test_queue(), + VQ = variable_queue_init(test_amqqueue(true), false), + S0 = rabbit_variable_queue:status(VQ), + assert_props(S0, [{q1, 0}, {q2, 0}, + {delta, {delta, undefined, 0, undefined}}, + {q3, 0}, {q4, 0}, + {len, 0}]), + _ = rabbit_variable_queue:delete_and_terminate( + shutdown, Fun(VQ)), + Me ! Ref + end), + receive + Ref -> ok + end, passed. publish_and_confirm(Q, Payload, Count) -> |
