EventedStreamReader not really emitting OnCompleteLine() per each line received #6146
Labels
area-mvc
Includes: MVC, Actions and Controllers, Localization, CORS, most templates
bug
This issue describes a behavior which is not expected - a bug.
Done
This issue has been fixed
help wanted
Up for grabs. We would accept a PR to help resolve this issue
Milestone
Describe the bug
EventedStreamReader's Run() method sometimes reads chunks containing multiple
\n
, but it only cares about the first\n
it sees, and buffers the rest. The problem is when the chunk is the last output coming of npm duringnpm run serve
, for a while. The remaining buffer is not notified (OnCompleteLine()
is not called).The risk is WaitFor(Regex regex) randomly missing the opportunity to finish, because it might miss some lines, as it listens to
onReceivedLineHandler
, and not to chunk events.To Reproduce
Steps to reproduce the behavior:
npm
's stdout a stream chunk that contains multiple\n
characters in it;\n
) gets notified to the event listeners, the rest doesn't.Expected behavior
I would expect one call to OnCompleteLine() per actual line.
The text was updated successfully, but these errors were encountered: