Added time limit.

This commit is contained in:
Stephen Atherton 2019-05-21 22:19:14 -07:00
parent 3f8fce0296
commit e9197a8f70
1 changed files with 5 additions and 0 deletions

View File

@ -3020,6 +3020,7 @@ TEST_CASE("!/redwood/correctness") {
state bool serialTest = g_random->coinflip();
state bool shortTest = g_random->coinflip();
state bool singleVersion = true; // Multi-version mode is broken / not finished
state double startTime = now();
printf("serialTest: %d shortTest: %d singleVersion: %d\n", serialTest, shortTest, singleVersion);
@ -3075,6 +3076,10 @@ TEST_CASE("!/redwood/correctness") {
state Future<Void> commit = Void();
while(mutationBytes.get() < mutationBytesTarget) {
if(now() - startTime > 600) {
mutationBytesTarget = mutationBytes.get();
}
// Sometimes advance the version
if(g_random->random01() < 0.10) {
++version;