diff options
| author | Philip Kuryloski <kuryloskip@vmware.com> | 2020-06-04 14:42:16 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-04 14:42:16 +0200 |
| commit | dcd53c92edf56dbd3588f6c529eda1286682af6b (patch) | |
| tree | 96da57f48aed39addba10895b56fb180a5d965c5 | |
| parent | 5d96d1d8c6c423f75f6b9c77a605a7657f03de23 (diff) | |
| parent | 8f3a718c7dbebda620f03ac8468be9493257eee5 (diff) | |
| download | rabbitmq-server-git-dcd53c92edf56dbd3588f6c529eda1286682af6b.tar.gz | |
Merge pull request #2365 from rabbitmq/simple_ha-test-stability
Stricter test setup for simple_ha_SUITE
| -rw-r--r-- | test/simple_ha_SUITE.erl | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/test/simple_ha_SUITE.erl b/test/simple_ha_SUITE.erl index 567f43fe67..7cf21a92eb 100644 --- a/test/simple_ha_SUITE.erl +++ b/test/simple_ha_SUITE.erl @@ -280,12 +280,23 @@ rejects_survive(Config, DeathFun) -> durable = true, arguments = [{<<"x-max-length">>, long, 1}, {<<"x-overflow">>, longstr, XOverflow}]}), - Payload = <<"there can be only one">>, - amqp_channel:call(Node1Channel, - #'basic.publish'{routing_key = Queue}, - #amqp_msg{payload = Payload}), - %% send a bunch of messages from the producer. Tolerating nacks. + amqp_channel:register_confirm_handler(Node1Channel, self()), + #'confirm.select_ok'{} = amqp_channel:call(Node1Channel, #'confirm.select'{}), + + Payload = <<"there can be only one">>, + ok = amqp_channel:call(Node1Channel, + #'basic.publish'{routing_key = Queue}, + #amqp_msg{payload = Payload}), + + ok = receive + #'basic.ack'{multiple = false} -> ok; + #'basic.nack'{multiple = false} -> message_nacked + after + 5000 -> confirm_not_received + end, + + %% send a bunch of messages from the producer. They should all be nacked, as the queue is full. ProducerPid = rabbit_ha_test_producer:create(Node2Channel, Queue, self(), true, Msgs, nacks), DeathFun(Config, A), |
