1
0
Fork 0

added waitForSync option to make tests more deterministic (#6885)

This commit is contained in:
Jan 2018-10-15 17:36:59 +02:00 committed by GitHub
parent ebb41852f6
commit c7933bcb31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -465,7 +465,7 @@ function dumpTestSuite () {
assertTrue(Math.abs(props.consolidationPolicy.threshold - 0.3) < 0.001);
assertEqual(props.consolidationPolicy.type, "bytes_accum");
var res = db._query("FOR doc IN " + view.name() + " SEARCH doc.value >= 0 RETURN doc").toArray();
var res = db._query("FOR doc IN " + view.name() + " SEARCH doc.value >= 0 OPTIONS { waitForSync: true } RETURN doc").toArray();
assertEqual(5000, res.length);
res = db._query("FOR doc IN " + view.name() + " SEARCH doc.value >= 2500 RETURN doc").toArray();

View File

@ -331,7 +331,7 @@ function dumpTestSuite () {
assertTrue(Math.abs(props.consolidationPolicy.threshold - 0.3) < 0.001);
assertEqual(props.consolidationPolicy.type, "bytes_accum");
var res = db._query("FOR doc IN " + view.name() + " SEARCH doc.value >= 0 RETURN doc").toArray();
var res = db._query("FOR doc IN " + view.name() + " SEARCH doc.value >= 0 OPTIONS { waitForSync: true } RETURN doc").toArray();
assertEqual(5000, res.length);
res = db._query("FOR doc IN " + view.name() + " SEARCH doc.value >= 2500 RETURN doc").toArray();

View File

@ -417,7 +417,7 @@ function dumpTestSuite () {
assertTrue(Math.abs(props.consolidationPolicy.threshold - 0.3) < 0.001);
assertEqual(props.consolidationPolicy.type, "bytes_accum");
var res = db._query("FOR doc IN " + view.name() + " SEARCH doc.value >= 0 RETURN doc").toArray();
var res = db._query("FOR doc IN " + view.name() + " SEARCH doc.value >= 0 OPTIONS { waitForSync: true } RETURN doc").toArray();
assertEqual(5000, res.length);
res = db._query("FOR doc IN " + view.name() + " SEARCH doc.value >= 2500 RETURN doc").toArray();