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

Include actual log count in checkLog error messages

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • Server Security
    • 2

    Description

      The checkLog object provides access to various helper functions that can be used to assert the presence of certain logs. Some of these functions - namely, checkContainsWithCountJson, checkContainsWithAtLeastCountJson, containsRelaxedJson, containsWithCount, and containsWithAtLeastCount - allow the caller to specify an expected number of logs matching some criteria and compare the counted number of logs with the expected number. However, the error messages for all of these functions do not specify the counted number of logs meeting the criteria that were found in the log. As a result, it's difficult to debug whether the desired log was completely missing, occurred too few times, or occurred too many times. Providing this information in the error message would improve the debugging experience of tests that expect certain logs to appear roughly a certain number of times.

      Attachments

        Activity

          People

            backlog-server-security Backlog - Security Team
            varun.ravichandran@mongodb.com Varun Ravichandran
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: