From bb827dd81e5912a307bee0b40acaf8e343ad383d Mon Sep 17 00:00:00 2001 From: Diana Corbacho Date: Wed, 14 Sep 2016 12:44:35 +0100 Subject: [PATCH 1/3] Stop master with reason shutdown on duplicated masters * Avoid removing the queue record --- src/rabbit_mirror_queue_coordinator.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rabbit_mirror_queue_coordinator.erl b/src/rabbit_mirror_queue_coordinator.erl index 017d1d1fa2..fe1168f120 100644 --- a/src/rabbit_mirror_queue_coordinator.erl +++ b/src/rabbit_mirror_queue_coordinator.erl @@ -363,7 +363,7 @@ handle_cast({gm_deaths, DeadGMPids}, %% NOTE: Reported deaths here, could be inconsistant. rabbit_mirror_queue_misc:report_deaths(MPid, false, QueueName, DeadPids), - {stop, normal, State}; + {stop, shutdown, State}; {error, not_found} -> {stop, normal, State} end; From b52470750d82d5653c8b23e6a5c93c3a2df6faad Mon Sep 17 00:00:00 2001 From: Michael Klishin Date: Thu, 15 Sep 2016 18:33:04 +0300 Subject: [PATCH 2/3] Update expectations for new credit flow values --- test/unit_inbroker_SUITE.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/unit_inbroker_SUITE.erl b/test/unit_inbroker_SUITE.erl index e9ecbf5444..98cd77ccbe 100644 --- a/test/unit_inbroker_SUITE.erl +++ b/test/unit_inbroker_SUITE.erl @@ -1684,15 +1684,15 @@ credit_flow_settings(Config) -> credit_flow_settings1(_Config) -> %% default values - passed = test_proc(200, 50), + passed = test_proc(200, 100), - application:set_env(rabbit, credit_flow_default_credit, {100, 20}), - passed = test_proc(100, 20), + application:set_env(rabbit, credit_flow_default_credit, {100, 300}), + passed = test_proc(100, 300), application:unset_env(rabbit, credit_flow_default_credit), % back to defaults - passed = test_proc(200, 50), + passed = test_proc(200, 100), passed. test_proc(InitialCredit, MoreCreditAfter) -> From 36c92f534885cee048ad1a4bce891a8cb46f50c2 Mon Sep 17 00:00:00 2001 From: Michael Klishin Date: Thu, 15 Sep 2016 18:33:04 +0300 Subject: [PATCH 3/3] Update expectations for new credit flow values --- test/unit_inbroker_SUITE.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/unit_inbroker_SUITE.erl b/test/unit_inbroker_SUITE.erl index e9ecbf5444..98cd77ccbe 100644 --- a/test/unit_inbroker_SUITE.erl +++ b/test/unit_inbroker_SUITE.erl @@ -1684,15 +1684,15 @@ credit_flow_settings(Config) -> credit_flow_settings1(_Config) -> %% default values - passed = test_proc(200, 50), + passed = test_proc(200, 100), - application:set_env(rabbit, credit_flow_default_credit, {100, 20}), - passed = test_proc(100, 20), + application:set_env(rabbit, credit_flow_default_credit, {100, 300}), + passed = test_proc(100, 300), application:unset_env(rabbit, credit_flow_default_credit), % back to defaults - passed = test_proc(200, 50), + passed = test_proc(200, 100), passed. test_proc(InitialCredit, MoreCreditAfter) ->