Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-35765

distancefield_and_includelocs.js should not use exact document equality when checking output

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.1
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • None
    • Fully Compatible
    • ALL
    • Query 2018-07-02, Query 2018-07-16
    • 46

      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.

            Assignee:
            charlie.swanson@mongodb.com Charlie Swanson
            Reporter:
            kyle.suarez@mongodb.com Kyle Suarez
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: