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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: 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
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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
            Reporter:
            Kyle Suarez (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: