Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fails test with latest end-of-stream #13

Open
ronag opened this issue Oct 1, 2019 · 0 comments
Open

fails test with latest end-of-stream #13

ronag opened this issue Oct 1, 2019 · 0 comments

Comments

@ronag
Copy link

ronag commented Oct 1, 2019

I don't exactly understand how mafintosh/end-of-stream@c023407 can cause the failure. But the failure seems related to two things:

  • error/close is emitted asynchronously from destroy which causes unpipe to be delayed resulting in a write after destroy (stream: pipe and async error nodejs/node#29790)
  • error can be emitted twice (this I believe has been fixed in Node master so it might be worth to just wait for a stream-readable update). The second error should just be swallowed. However, the problem here is that the write after destroy error might be preceded by the actual error (see comment in stream: pipe and async error nodejs/node#29790)

Ref: nodejs/node#29504

# preserves error again
ok 19 should be truthy
ok 20 does not close with premature close
ok 21 should be truthy
ok 22 does not close with premature close
not ok 23 .end() called twice
  ---
    operator: fail
    at: Pumpify.<anonymous> (/Users/ronagy/GitHub/public/pumpify/test.js:210:9)
    stack: |-
      Error: .end() called twice
          at Test.assert [as _assert] (/Users/ronagy/GitHub/public/pumpify/node_modules/tape/lib/test.js:225:54)
          at Test.bound [as _assert] (/Users/ronagy/GitHub/public/pumpify/node_modules/tape/lib/test.js:77:32)
          at Test.fail (/Users/ronagy/GitHub/public/pumpify/node_modules/tape/lib/test.js:318:10)
          at Test.bound [as fail] (/Users/ronagy/GitHub/public/pumpify/node_modules/tape/lib/test.js:77:32)
          at Test.end (/Users/ronagy/GitHub/public/pumpify/node_modules/tape/lib/test.js:151:14)
          at Test.bound [as end] (/Users/ronagy/GitHub/public/pumpify/node_modules/tape/lib/test.js:77:32)
          at Pumpify.<anonymous> (/Users/ronagy/GitHub/public/pumpify/test.js:210:9)
          at Pumpify.emit (events.js:209:13)
          at Pumpify.Duplexify._destroy (/Users/ronagy/GitHub/public/pumpify/node_modules/duplexify/index.js:195:15)
          at /Users/ronagy/GitHub/public/pumpify/node_modules/duplexify/index.js:185:10
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant