Adapt to members of DDCollection class that were accessed directly in test cases becoming private
This commit is contained in:
parent
36c5d3a1e6
commit
c3bb248d61
|
@ -5359,8 +5359,8 @@ TEST_CASE("/DataDistribution/GetTeam/NewServersNotNeeded") {
|
|||
|
||||
collection->addTeam(std::set<UID>({ UID(1, 0), UID(2, 0), UID(3, 0) }), true);
|
||||
collection->addTeam(std::set<UID>({ UID(2, 0), UID(3, 0), UID(4, 0) }), true);
|
||||
collection->doBuildTeams = false;
|
||||
collection->checkTeamDelay = Void();
|
||||
collection->enableBuildingTeams(false);
|
||||
collection->clearCheckTeamDelay();
|
||||
|
||||
collection->server_info[UID(1, 0)]->serverMetrics = mid_avail;
|
||||
collection->server_info[UID(2, 0)]->serverMetrics = high_avail;
|
||||
|
@ -5418,8 +5418,8 @@ TEST_CASE("/DataDistribution/GetTeam/HealthyCompleteSource") {
|
|||
|
||||
collection->addTeam(std::set<UID>({ UID(1, 0), UID(2, 0), UID(3, 0) }), true);
|
||||
collection->addTeam(std::set<UID>({ UID(2, 0), UID(3, 0), UID(4, 0) }), true);
|
||||
collection->doBuildTeams = false;
|
||||
collection->checkTeamDelay = Void();
|
||||
collection->enableBuildingTeams(false);
|
||||
collection->clearCheckTeamDelay();
|
||||
|
||||
collection->server_info[UID(1, 0)]->serverMetrics = mid_avail;
|
||||
collection->server_info[UID(2, 0)]->serverMetrics = high_avail;
|
||||
|
@ -5478,8 +5478,8 @@ TEST_CASE("/DataDistribution/GetTeam/TrueBestLeastUtilized") {
|
|||
|
||||
collection->addTeam(std::set<UID>({ UID(1, 0), UID(2, 0), UID(3, 0) }), true);
|
||||
collection->addTeam(std::set<UID>({ UID(2, 0), UID(3, 0), UID(4, 0) }), true);
|
||||
collection->doBuildTeams = false;
|
||||
collection->checkTeamDelay = Void();
|
||||
collection->enableBuildingTeams(false);
|
||||
collection->clearCheckTeamDelay();
|
||||
|
||||
/*
|
||||
* Among server teams that have healthy space available, pick the team that is
|
||||
|
@ -5535,8 +5535,8 @@ TEST_CASE("/DataDistribution/GetTeam/TrueBestMostUtilized") {
|
|||
|
||||
collection->addTeam(std::set<UID>({ UID(1, 0), UID(2, 0), UID(3, 0) }), true);
|
||||
collection->addTeam(std::set<UID>({ UID(2, 0), UID(3, 0), UID(4, 0) }), true);
|
||||
collection->doBuildTeams = false;
|
||||
collection->checkTeamDelay = Void();
|
||||
collection->enableBuildingTeams(false);
|
||||
collection->clearCheckTeamDelay();
|
||||
|
||||
collection->server_info[UID(1, 0)]->serverMetrics = mid_avail;
|
||||
collection->server_info[UID(2, 0)]->serverMetrics = high_avail;
|
||||
|
@ -5592,8 +5592,8 @@ TEST_CASE("/DataDistribution/GetTeam/ServerUtilizationBelowCutoff") {
|
|||
|
||||
collection->addTeam(std::set<UID>({ UID(1, 0), UID(2, 0), UID(3, 0) }), true);
|
||||
collection->addTeam(std::set<UID>({ UID(2, 0), UID(3, 0), UID(4, 0) }), true);
|
||||
collection->doBuildTeams = false;
|
||||
collection->checkTeamDelay = Void();
|
||||
collection->enableBuildingTeams(false);
|
||||
collection->clearCheckTeamDelay();
|
||||
|
||||
collection->server_info[UID(1, 0)]->serverMetrics = high_avail;
|
||||
collection->server_info[UID(2, 0)]->serverMetrics = low_avail;
|
||||
|
@ -5653,8 +5653,8 @@ TEST_CASE("/DataDistribution/GetTeam/ServerUtilizationNearCutoff") {
|
|||
collection->addTeam(std::set<UID>({ UID(1, 0), UID(2, 0), UID(3, 0) }), true);
|
||||
collection->addTeam(std::set<UID>({ UID(2, 0), UID(3, 0), UID(4, 0) }), true);
|
||||
collection->addTeam(std::set<UID>({ UID(3, 0), UID(4, 0), UID(5, 0) }), true);
|
||||
collection->doBuildTeams = false;
|
||||
collection->checkTeamDelay = Void();
|
||||
collection->enableBuildingTeams(false);
|
||||
collection->clearCheckTeamDelay();
|
||||
|
||||
collection->server_info[UID(1, 0)]->serverMetrics = high_avail;
|
||||
collection->server_info[UID(2, 0)]->serverMetrics = low_avail;
|
||||
|
|
|
@ -595,6 +595,12 @@ public:
|
|||
|
||||
void addTeam(std::set<UID> const& team, bool isInitialTeam) { addTeam(team.begin(), team.end(), isInitialTeam); }
|
||||
|
||||
// FIXME: Public for testing only
|
||||
void enableBuildingTeams(bool doBuildTeams) { this->doBuildTeams = doBuildTeams; }
|
||||
|
||||
// FIXME: Public for testing only
|
||||
void clearCheckTeamDelay() { this->checkTeamDelay = Void(); }
|
||||
|
||||
// FIXME: Public for testing only
|
||||
// Group storage servers (process) based on their machineId in LocalityData
|
||||
// All created machines are healthy
|
||||
|
|
Loading…
Reference in New Issue