[SERVER-49302] Properly assert that expected log messages are present in hybrid_unique_index_with_updates.js Created: 02/Jul/20  Updated: 27/Oct/23  Resolved: 09/Jul/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Gregory Noma Assignee: Backlog - Storage Execution Team
Resolution: Gone away Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-46026 Fix tests reliant on specific log lines Closed
is related to SERVER-49303 Properly assert that expected log mes... Closed
Assigned Teams:
Storage Execution
Operating System: ALL
Participants:

 Description   

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());



 Comments   
Comment by Gregory Noma [ 09/Jul/20 ]

This ended up being fixed as a part of SERVER-49244.

Generated at Thu Feb 08 05:19:28 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.