diff options
| author | kjnilsson <knilsson@pivotal.io> | 2019-03-01 10:53:58 +0000 |
|---|---|---|
| committer | kjnilsson <knilsson@pivotal.io> | 2019-03-01 10:53:58 +0000 |
| commit | ec7f0188e86e7588b0cd99a9744c2ebad33fa682 (patch) | |
| tree | a92983fa3cadbda87cd2308526a01af504bf6e2c /src | |
| parent | a19d77f20e312246767d8bfaa87529c2b546260b (diff) | |
| download | rabbitmq-server-git-ec7f0188e86e7588b0cd99a9744c2ebad33fa682.tar.gz | |
Tweak qourum queue tick interval for tests
As some tests use metrics to assert on and quorum queues only emit
metrics every 5s by default. This change takes it down to 1s for
selected suites.
It also introduces a new `quorum_tick_interval` application parameter to
set this interval.
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_quorum_queue.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rabbit_quorum_queue.erl b/src/rabbit_quorum_queue.erl index 28cfe9e558..c685785d0d 100644 --- a/src/rabbit_quorum_queue.erl +++ b/src/rabbit_quorum_queue.erl @@ -120,6 +120,7 @@ declare(Q) when ?amqqueue_is_quorum(Q) -> RaMachine = ra_machine(NewQ), ServerIds = [{RaName, Node} || Node <- Nodes], ClusterName = RaName, + TickTimeout = application:get_env(rabbit, quorum_tick_interval, ?TICK_TIMEOUT), RaConfs = [begin UId = ra:new_uid(ra_lib:to_binary(ClusterName)), FName = rabbit_misc:rs(QName), @@ -129,7 +130,7 @@ declare(Q) when ?amqqueue_is_quorum(Q) -> friendly_name => FName, initial_members => ServerIds, log_init_args => #{uid => UId}, - tick_timeout => ?TICK_TIMEOUT, + tick_timeout => TickTimeout, machine => RaMachine} end || ServerId <- ServerIds], |
