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

Make merge_causes_infinite_loop.js more robust

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.4.0-rc13, 4.7.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • v4.4
    • Query 2020-07-13
    • 10

      From the linked BF:

      Instead of verifying that the aggregate times out as expected, this test would be not only more robust, but also more correct if we verified that the contents of the output collection are what we expect. More precisely, the purpose of this test is to verify that when $merge outputs to the collection that is being aggregated over, it can trigger an infinite loop of updates, so in the control case (i.e. the aggregate which outputs to a different collection), it doesn’t matter whether the aggregate takes under 2500ms or not, rather, it matters that each document has a value of ‘a’ that is double to its original value. This would confirm in the control case that each original document was updated exactly once as expected.

            Assignee:
            mihai.andrei@mongodb.com Mihai Andrei
            Reporter:
            mihai.andrei@mongodb.com Mihai Andrei
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: