Skip to content

wdio-local-runner: unpipe streams in the end#3882

Merged
christian-bromann merged 2 commits intowebdriverio:masterfrom
mgrybyk:fix-max-listeners-warning
Apr 25, 2019
Merged

wdio-local-runner: unpipe streams in the end#3882
christian-bromann merged 2 commits intowebdriverio:masterfrom
mgrybyk:fix-max-listeners-warning

Conversation

@mgrybyk
Copy link
Member

@mgrybyk mgrybyk commented Apr 24, 2019

Proposed changes

Previously RunnerTransformStream streams were closed.
After recent changes closing stream was causing Error [ERR_STREAM_WRITE_AFTER_END]: write after end because end was triggered while streams were in pipe.

Added unpipe and restored stream closing functionality.

fixes #3877

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

I have some problems with covering this functionality with proper tests.
Just added test to ensure unpipe was called.

Reviewers: @webdriverio/technical-committee

@codecov
Copy link

codecov bot commented Apr 24, 2019

Codecov Report

Merging #3882 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3882      +/-   ##
==========================================
+ Coverage   98.57%   98.57%   +<.01%     
==========================================
  Files         153      153              
  Lines        3432     3434       +2     
  Branches      749      749              
==========================================
+ Hits         3383     3385       +2     
  Misses         44       44              
  Partials        5        5
Impacted Files Coverage Δ
packages/wdio-local-runner/src/transformStream.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6e5d2a0...d038c04. Read the comment docs.

@christian-bromann christian-bromann added the PR: Polish 💅 PRs that contain improvements on existing features label Apr 25, 2019
Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@christian-bromann christian-bromann merged commit 45962bc into webdriverio:master Apr 25, 2019
@christian-bromann
Copy link
Member

Nice fix!

abjerstedt pushed a commit that referenced this pull request Apr 26, 2019
* wdio-local-runner: unpipe streams in the end

* wdio-local-runner: transformStream _final test
@mgrybyk mgrybyk deleted the fix-max-listeners-warning branch May 2, 2019 17:29
yamkay pushed a commit to MoveInc/webdriverio that referenced this pull request Sep 4, 2019
* wdio-local-runner: unpipe streams in the end

* wdio-local-runner: transformStream _final test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Polish 💅 PRs that contain improvements on existing features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MaxListenersExceededWarning: Possible EventEmitter memory leak detected

2 participants