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

Do not use collection.count() in test asserts

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 6.3.0-rc0
    • None
    • None
    • None
    • Fully Compatible
    • ALL
    • QE 2023-01-09, QE 2023-01-23
    • 149

    Description

      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).

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: