mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
SERVER-53402 Relax assertion to account for precision loss in stddev calculation
This commit is contained in:
parent
9e92a6d17e
commit
9c9a881539
@ -100,9 +100,18 @@ function testAccumAgainstGroup(coll, accum) {
|
||||
});
|
||||
}
|
||||
|
||||
assert.eq(groupRes,
|
||||
wfResults[index].res,
|
||||
"Window function result for index " + index + ": " + tojson(wfRes));
|
||||
// On DEBUG builds, the computed $group may be slightly different due to precision
|
||||
// loss when spilling to disk.
|
||||
// TODO SERVER-42616: Enable the exact check for $stdDevPop/Samp.
|
||||
if (accum == "$stdDevSamp" || accum == "$stdDevPop")
|
||||
assert.close(groupRes,
|
||||
wfResults[index].res,
|
||||
"Window function result for index " + index + ": " + tojson(wfRes),
|
||||
10 /* 10 decimal places */);
|
||||
else
|
||||
assert.eq(groupRes,
|
||||
wfResults[index].res,
|
||||
"Window function result for index " + index + ": " + tojson(wfRes));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user