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

checkLog.checkContainsOnce returns success on multiple matches

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Labels:
      None
    • Server Tooling & Methods
    • ALL

      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.

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

              Created:
              Updated:
              Resolved: