Skip to content

Bug: StreamToFile readUntil function doesn't increment after finding the searchString #164

@TB-1993

Description

@TB-1993

Problem/Opportunity

When a search string is given to the readUntil function of the StreamToFile class. The class iterates through each line of the log file, checking each one for the presence of the searchString. The line it starts reading from in the log file is always the last line it has previously read. Therefore, it will not search the same line twice for a string. However, when it successfully finds a string in the log file, it does not increment the line counter. Therefore, if the same searchString is given in back to back calls of the readUntil function, it will return the same line each time.

Steps to reproduce

Running the test at the bottom of the HDMICECController in a loop can demonstrate this issues.

Expected Behavior

It should search for the next occurrence of the search string, rather than instantly returning the same occurrence that it previously found.

Actual Behavior

If the same searchString is given in back to back calls of the readUntil function, it will return the same line each time.

Notes (Optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions