diff options
author | Tor Brede Vekterli <vekterli@verizonmedia.com> | 2019-03-20 15:37:55 +0000 |
---|---|---|
committer | Tor Brede Vekterli <vekterli@verizonmedia.com> | 2019-03-20 16:56:58 +0100 |
commit | 9c7c9ceecbb58f1ee82d212a6347bd5ec676490d (patch) | |
tree | ab3de76c1412ce323ff295f2fb2294c81b77e516 /storage/src/tests/storageserver | |
parent | 83665fa55dc66388bd134136ac09c30fb93a99eb (diff) |
Always allow activation commands through bouncer component
Otherwise we'd miss activation commands sent for a cluster state in
which our own node is marked down.
Diffstat (limited to 'storage/src/tests/storageserver')
-rw-r--r-- | storage/src/tests/storageserver/bouncertest.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/storage/src/tests/storageserver/bouncertest.cpp b/storage/src/tests/storageserver/bouncertest.cpp index 27c13a3707e..371c24accbc 100644 --- a/storage/src/tests/storageserver/bouncertest.cpp +++ b/storage/src/tests/storageserver/bouncertest.cpp @@ -43,6 +43,7 @@ struct BouncerTest : public CppUnit::TestFixture { void outOfBoundsConfigValuesThrowException(); void abort_request_when_derived_bucket_space_node_state_is_marked_down(); void client_operations_are_allowed_through_on_cluster_state_down_distributor(); + void cluster_state_activation_commands_are_not_bounced(); CPPUNIT_TEST_SUITE(BouncerTest); CPPUNIT_TEST(testFutureTimestamp); @@ -57,6 +58,7 @@ struct BouncerTest : public CppUnit::TestFixture { CPPUNIT_TEST(outOfBoundsConfigValuesThrowException); CPPUNIT_TEST(abort_request_when_derived_bucket_space_node_state_is_marked_down); CPPUNIT_TEST(client_operations_are_allowed_through_on_cluster_state_down_distributor); + CPPUNIT_TEST(cluster_state_activation_commands_are_not_bounced); CPPUNIT_TEST_SUITE_END(); using Priority = api::StorageMessage::Priority; @@ -368,5 +370,17 @@ void BouncerTest::client_operations_are_allowed_through_on_cluster_state_down_di CPPUNIT_ASSERT_EQUAL(uint64_t(0), _manager->metrics().unavailable_node_aborts.getValue()); } +void BouncerTest::cluster_state_activation_commands_are_not_bounced() { + tearDown(); + setUpAsNode(lib::NodeType::DISTRIBUTOR); + + auto state = makeClusterStateBundle("version:10 distributor:3 .2.s:d storage:3", {}); // Our index (2) is down + _node->getNodeStateUpdater().setClusterStateBundle(state); + + auto activate_cmd = std::make_shared<api::ActivateClusterStateVersionCommand>(11); + _upper->sendDown(activate_cmd); + assertMessageNotBounced(); +} + } // storage |