diff options
| author | Philip Kuryloski <kuryloskip@vmware.com> | 2020-06-09 14:44:23 +0200 |
|---|---|---|
| committer | Philip Kuryloski <kuryloskip@vmware.com> | 2020-06-09 14:44:23 +0200 |
| commit | a3fa9c857b2c79c4bec8a41db1f1438a91396ebb (patch) | |
| tree | d22ef7892a0fbb2e4fa09d500b8538174d9916aa /test | |
| parent | a74639c305173da50a472b289d42d3c461bc1909 (diff) | |
| download | rabbitmq-server-git-a3fa9c857b2c79c4bec8a41db1f1438a91396ebb.tar.gz | |
Stricter setup in the confirms_survive_* tests
Wait until at least one message has been confirmed before triggering the survivable change
Diffstat (limited to 'test')
| -rw-r--r-- | test/simple_ha_SUITE.erl | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/simple_ha_SUITE.erl b/test/simple_ha_SUITE.erl index 7cf21a92eb..10d8eda9ee 100644 --- a/test/simple_ha_SUITE.erl +++ b/test/simple_ha_SUITE.erl @@ -259,6 +259,22 @@ confirms_survive(Config, DeathFun) -> auto_delete = false, durable = true}), + %% send one message to ensure the channel is flowing + amqp_channel:register_confirm_handler(Node1Channel, self()), + #'confirm.select_ok'{} = amqp_channel:call(Node1Channel, #'confirm.select'{}), + + Payload = <<"initial message">>, + 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 ProducerPid = rabbit_ha_test_producer:create(Node2Channel, Queue, self(), true, Msgs), |
