Fix SimulationConfig never generating a custom config.

A 0 was changed to a 1 when rewriting code, and `case 0:` was never being hit. :(
Thankfully, it looks like nothing was broken by this in the meantime.
This commit is contained in:
Alex Miller 2017-09-18 17:26:24 -07:00
parent e8b895c878
commit 567d663afd
1 changed files with 2 additions and 2 deletions

View File

@ -708,14 +708,14 @@ void SimulationConfig::generateNormalConfig(int minimumReplication) {
set_config("memory");
}
int replication_type = std::max(minimumReplication, std::min(g_random->randomInt( 1, 6 ), 3));
int replication_type = std::max(minimumReplication, std::min(g_random->randomInt( 0, 6 ), 3));
//replication_type = 1; //ahm
switch (replication_type) {
case 0: {
TEST( true ); // Simulated cluster using custom redundancy mode
int storage_servers = g_random->randomInt(1,5);
int replication_factor = g_random->randomInt(1,5);
int anti_quorum = g_random->randomInt(0, db.tLogReplicationFactor);
int anti_quorum = g_random->randomInt(0, replication_factor);
// Go through buildConfiguration, as it sets tLogPolicy/storagePolicy.
set_config(format("storage_replicas:=%d storage_quorum:=%d "
"log_replicas:=%d log_anti_quorum:=%1 "