[SERVER-35765] distancefield_and_includelocs.js should not use exact document equality when checking output Created: 22/Jun/18 Updated: 29/Oct/23 Resolved: 04/Jul/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | None |
| Fix Version/s: | 4.1.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Kyle Suarez | Assignee: | Charlie Swanson |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Sprint: | Query 2018-07-02, Query 2018-07-16 | ||||
| Participants: | |||||
| Linked BF Score: | 46 | ||||
| Description |
|
distancefield_and_includelocs.js implicitly checks that the geo distance calculated by the server is correct by asserting that the output of an aggregation pipeline is exactly the same as some expected document. However, in the shell, we compute the distance using Geo.distance() or Geo.sphereDistance(), and floating-point error can make us close-but-not-close-enough to the actual distance computed by the server. The test should be rewritten such that we use some sort of equivalent of assert.close() on the distance field. |
| Comments |
| Comment by Githook User [ 04/Jul/18 ] |
|
Author: {'username': 'cswanson310', 'name': 'Charlie Swanson', 'email': 'charlie.swanson@mongodb.com'}Message: |
| Comment by Githook User [ 04/Jul/18 ] |
|
Author: {'username': 'cswanson310', 'name': 'Charlie Swanson', 'email': 'charlie.swanson@mongodb.com'}Message: This is in preparation for expanded functionality to allow for a custom |