fixing tss enablement with fault injections

This commit is contained in:
Josh Slocum 2021-09-15 08:20:00 -05:00 committed by Markus Pilman
parent 6673540553
commit 5728c97fd0
1 changed files with 2 additions and 2 deletions

View File

@ -1689,11 +1689,11 @@ void SimulationConfig::setTss(const TestConfig& testConfig) {
tssCount =
std::max(0, std::min(tssCount, (db.usableRegions * (machine_count / datacenters) - replication_type) / 2));
if (!testConfig.config.present() && tssCount > 0 && faultInjectionActivated) {
if (!testConfig.config.present() && tssCount > 0) {
std::string confStr = format("tss_count:=%d tss_storage_engine:=%d", tssCount, db.storageServerStoreType);
set_config(confStr);
double tssRandom = deterministicRandom()->random01();
if (tssRandom > 0.5) {
if (tssRandom > 0.5 || !faultInjectionActivated) {
// normal tss mode
g_simulator.tssMode = ISimulator::TSSMode::EnabledNormal;
} else if (tssRandom < 0.25 && !testConfig.isFirstTestInRestart) {