[SERVER-45477] checkLog.checkContainsOnce returns success on multiple matches Created: 10/Jan/20  Updated: 06/Dec/22  Resolved: 03/Dec/21

Status: Closed
Project: Core Server
Component/s: Shell, Testing Infrastructure
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Kevin Pulo Assignee: Backlog - Server Tooling and Methods (STM) (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Server Tooling & Methods
Operating System: ALL
Participants:

 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.



 Comments   
Comment by Brooke Miller [ 03/Dec/21 ]

STM doesn't have bandwidth to pick this up, so we're closing as won't fix. However, if other teams have capacity and would like to pursue this, please feel free to pick this up.

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