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

checkLog.checkContainsOnce returns success on multiple matches

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • Server Tooling & Methods
    • ALL

    Description

      The checkLog.checkContainsOnce function's name suggests that it will succeed only if there is a single line that matches. However, the code returns true as soon as a matching line is found, meaning it will actually succeed if there are many matching lines (which may not be what the caller intended). It would be better if the existing function was renamed to checkContains or checkContainsAtLeastOnce, and a new version of checkContainsOnce (or checkContainsExactlyOnce) was written which checked all the available log lines.

      Attachments

        Activity

          People

            backlog-server-stm Backlog - Server Tooling and Methods (STM) (Inactive)
            kevin.pulo@mongodb.com Kevin Pulo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: