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

Do not use collection.count() in test asserts

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • ALL
    • QE 2023-01-09, QE 2023-01-23
    • 149

      The issue started to pop up on MacOS builds after changing the change_stream_pit_pre_images.js test:

      • replaces friendlyEqual() with bsonUnorderedFieldsCompare() in assert.docEq() as the use of friendlyEqual() is discouraged
      • adjusted change_stream_pit_pre_images.js to use coll.count() and coll.hashAllDocs(), because bsonUnorderedFieldsCompare() does not support arguments over 16MB (SERVER-71979)

      However, using coll.count() in test asserts can lead to sporadic failures (as described here).

            Assignee:
            romans.kasperovics@mongodb.com Romans Kasperovics
            Reporter:
            romans.kasperovics@mongodb.com Romans Kasperovics
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: