From 071966ce9449886942b9ece2134c4100032d4b8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20Neunh=C3=B6ffer?= Date: Fri, 31 Aug 2018 21:54:55 +0200 Subject: [PATCH] Fix maintenance test. (#6326) --- tests/Maintenance/MaintenanceTest.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/Maintenance/MaintenanceTest.cpp b/tests/Maintenance/MaintenanceTest.cpp index 2fe24f42b7..fa24794453 100644 --- a/tests/Maintenance/MaintenanceTest.cpp +++ b/tests/Maintenance/MaintenanceTest.cpp @@ -781,13 +781,17 @@ TEST_CASE("ActionPhaseOne", "[cluster][maintenance]") { plan.toBuilder().slice(), node.second.toBuilder().slice(), node.first, errors, actions); - if (actions.size() != 1) { + if (actions.size() != 2) { std::cout << actions << std::endl; } - REQUIRE(actions.size() == 1); - REQUIRE(actions.front().name() == "ResignShardLeadership"); + REQUIRE(actions.size() == 2); + REQUIRE(actions.front().name() == "UpdateCollection"); REQUIRE(actions.front().get(DATABASE) == dbname); REQUIRE(actions.front().get(SHARD) == shname); + REQUIRE(actions.front().get("localLeader") == std::string("")); + REQUIRE(actions[1].name() == "ResignShardLeadership"); + REQUIRE(actions[1].get(DATABASE) == dbname); + REQUIRE(actions[1].get(SHARD) == shname); } }