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

Include actual log count in checkLog error messages

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Server Security
    • 2

      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.

            Assignee:
            backlog-server-security [DO NOT USE] Backlog - Security Team
            Reporter:
            varun.ravichandran@mongodb.com Varun Ravichandran
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: