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

Properly assert that expected log messages are present in hybrid_unique_index_with_updates.js

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Storage Execution
    • ALL

      In hybrid_unique_index_with_updates.js, we verify whether a log message is present using

      assert.soon(() => rawMongoProgramOutput().search(structuredLogMessage));
      

      However, the search() function returns the index of the first match, or -1 if there was no match. Thus, the current usage does not properly assert that the log message is present. This should be changed to either

      assert.soon(() => rawMongoProgramOutput().search(structuredLogMessage) !== -1);
      

      or

      assert.soon(() => structuredLogMessage.test(rawMongoProgramOutput());
      

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            gregory.noma@mongodb.com Gregory Noma
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: