[SERVER-49303] Properly assert that expected log messages are present in invalid_index_spec.js and initial_sync_invalid_index_spec.js Created: 02/Jul/20  Updated: 27/Oct/23  Resolved: 28/May/21

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: Gregory Wlodarek
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-49302 Properly assert that expected log mes... Closed
related to SERVER-46026 Fix tests reliant on specific log lines Closed
Operating System: ALL
Sprint: Execution Team 2021-06-14
Participants:

 Description   

In invalid_index_spec.js and initial_sync_invalid_index_spec.js, we verify whether a log message is present using

assert(rawMongoProgramOutput().search(/regex/));

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. These should be changed to either

assert.neq(rawMongoProgramOutput().search(/regex/), -1);

or

assert(/regex/.test(rawMongoProgramOutput());



 Comments   
Comment by Gregory Wlodarek [ 28/May/21 ]

Closing this ticket as 'gone away' as both tests have been deleted.

SERVER-52539 removed invalid_index_spec.js

SERVER-52545 removed initial_sync_invalid_index_spec.js

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