mirror of https://gitee.com/bigwinds/arangodb
added waitForSync option to make tests more deterministic (#6885)
This commit is contained in:
parent
ebb41852f6
commit
c7933bcb31
|
@ -465,7 +465,7 @@ function dumpTestSuite () {
|
||||||
assertTrue(Math.abs(props.consolidationPolicy.threshold - 0.3) < 0.001);
|
assertTrue(Math.abs(props.consolidationPolicy.threshold - 0.3) < 0.001);
|
||||||
assertEqual(props.consolidationPolicy.type, "bytes_accum");
|
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);
|
assertEqual(5000, res.length);
|
||||||
|
|
||||||
res = db._query("FOR doc IN " + view.name() + " SEARCH doc.value >= 2500 RETURN doc").toArray();
|
res = db._query("FOR doc IN " + view.name() + " SEARCH doc.value >= 2500 RETURN doc").toArray();
|
||||||
|
|
|
@ -331,7 +331,7 @@ function dumpTestSuite () {
|
||||||
assertTrue(Math.abs(props.consolidationPolicy.threshold - 0.3) < 0.001);
|
assertTrue(Math.abs(props.consolidationPolicy.threshold - 0.3) < 0.001);
|
||||||
assertEqual(props.consolidationPolicy.type, "bytes_accum");
|
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);
|
assertEqual(5000, res.length);
|
||||||
|
|
||||||
res = db._query("FOR doc IN " + view.name() + " SEARCH doc.value >= 2500 RETURN doc").toArray();
|
res = db._query("FOR doc IN " + view.name() + " SEARCH doc.value >= 2500 RETURN doc").toArray();
|
||||||
|
|
|
@ -417,7 +417,7 @@ function dumpTestSuite () {
|
||||||
assertTrue(Math.abs(props.consolidationPolicy.threshold - 0.3) < 0.001);
|
assertTrue(Math.abs(props.consolidationPolicy.threshold - 0.3) < 0.001);
|
||||||
assertEqual(props.consolidationPolicy.type, "bytes_accum");
|
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);
|
assertEqual(5000, res.length);
|
||||||
|
|
||||||
res = db._query("FOR doc IN " + view.name() + " SEARCH doc.value >= 2500 RETURN doc").toArray();
|
res = db._query("FOR doc IN " + view.name() + " SEARCH doc.value >= 2500 RETURN doc").toArray();
|
||||||
|
|
Loading…
Reference in New Issue