Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

fix: do not fail stop node if failed start node #771

Merged
merged 1 commit into from
May 17, 2018

Conversation

alanshaw
Copy link
Contributor

If failed start node in before, do not fail stop node in after.

It reduces the noise from IPFS node start failures by fixing the after hook so it doesn't also error when trying to stop a node that didn't start.

e.g.

  4) .refs "before all" hook:
     Uncaught AssertionError: expected [Error: connect ECONNREFUSED 127.0.0.1:53477] to not exist
      at ipfsd.api.id (test\ping.spec.js:47:30)
      at send (node_modules\ipfsd-ctl\node_modules\ipfs-api\src\id.js:19:16)
      at f (node_modules\once\once.js:25:25)
      at ClientRequest.req.on (node_modules\ipfsd-ctl\node_modules\ipfs-api\src\utils\send-request.js:168:5)
      at Socket.socketErrorListener (_http_client.js:387:9)
      at emitErrorNT (internal/streams/destroy.js:64:8)
      at _combinedTickCallback (internal/process/next_tick.js:138:11)
      at process._tickCallback (internal/process/next_tick.js:180:9)

This PR stops us from also receiving this noise:

  5) .refs "after all" hook:
     TypeError: Cannot read property 'stop' of undefined
      at Context.after (test\refs.spec.js:52:25)

@ghost ghost assigned alanshaw May 16, 2018
@ghost ghost added the in progress label May 16, 2018
Copy link
Contributor

@daviddias daviddias left a comment

Choose a reason for hiding this comment

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

LGTM

@alanshaw alanshaw merged commit c047cd3 into master May 17, 2018
@alanshaw alanshaw deleted the fix/no-fail-stop-if-fail-start branch May 17, 2018 09:50
@ghost ghost removed the in progress label May 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants