fix: file_corrupt was not checking for fault injection

latency threshold was too long
This commit is contained in:
Evan Tschannen 2017-09-25 17:22:41 -07:00
parent e5e7f8a081
commit 2bf042a559
2 changed files with 6 additions and 2 deletions

View File

@ -1587,7 +1587,11 @@ private:
if (checkIntegrityOnOpen || EXPENSIVE_VALIDATION) {
if(conn.check(false) != 0) {
// A corrupt btree structure must not be used.
throw file_corrupt();
if (g_network->isSimulated() && (g_simulator.getCurrentProcess()->fault_injection_p1 || g_simulator.getCurrentProcess()->machine->machineProcess->fault_injection_p1 || g_simulator.getCurrentProcess()->rebooting)) {
throw file_corrupt().asInjectedFault();
} else {
throw file_corrupt();
}
}
}
}

View File

@ -37,7 +37,7 @@ struct LowLatencyWorkload : TestWorkload {
: TestWorkload(wcx), operations("Operations"), retries("Retries") , ok(true)
{
testDuration = getOption( options, LiteralStringRef("testDuration"), 600.0 );
maxLatency = getOption( options, LiteralStringRef("maxLatency"), 16.0 );
maxLatency = getOption( options, LiteralStringRef("maxLatency"), 20.0 );
checkDelay = getOption( options, LiteralStringRef("checkDelay"), 1.0 );
}