restore the original tssMode in restarting tests

This commit is contained in:
Evan Tschannen 2021-09-16 10:52:33 -07:00
parent 5f59c037af
commit 8926951a0a
2 changed files with 6 additions and 0 deletions

View File

@ -1024,6 +1024,10 @@ ACTOR Future<Void> restartSimulatedSystem(std::vector<Future<Void>>* systemActor
}
int desiredCoordinators = atoi(ini.GetValue("META", "desiredCoordinators"));
int testerCount = atoi(ini.GetValue("META", "testerCount"));
auto tssModeStr = ini.GetValue("META", "tssMode");
if (tssModeStr != nullptr) {
g_simulator.tssMode = (ISimulator::TSSMode)atoi(tssModeStr);
}
bool enableExtraDB = (testConfig.extraDB == 3);
ClusterConnectionString conn(ini.GetValue("META", "connectionString"));
if (enableExtraDB) {
@ -1126,6 +1130,7 @@ ACTOR Future<Void> restartSimulatedSystem(std::vector<Future<Void>>* systemActor
g_simulator.desiredCoordinators = desiredCoordinators;
g_simulator.processesPerMachine = processesPerMachine;
g_simulator.tssMode = ISimulator::TSSMode::Unknown;
uniquify(dcIds);
if (!BUGGIFY && dcIds.size() == 2 && dcIds[0] != "" && dcIds[1] != "") {

View File

@ -65,6 +65,7 @@ struct SaveAndKillWorkload : TestWorkload {
ini.SetValue("META", "desiredCoordinators", format("%d", g_simulator.desiredCoordinators).c_str());
ini.SetValue("META", "connectionString", g_simulator.connectionString.c_str());
ini.SetValue("META", "testerCount", format("%d", g_simulator.testerCount).c_str());
ini.SetValue("META", "tssMode", format("%d", g_simulator.tssMode).c_str());
std::vector<ISimulator::ProcessInfo*> processes = g_simulator.getAllProcesses();
std::map<NetworkAddress, ISimulator::ProcessInfo*> rebootingProcesses = g_simulator.currentlyRebootingProcesses;