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

Expose the remaining resources in timeout error messages (#72) #73

Merged
merged 1 commit into from Aug 8, 2020

Conversation

jmealo
Copy link
Contributor

@jmealo jmealo commented Aug 6, 2020

Implements #72

I tried to log errors straight away, however, that introduced stack traces for timeout errors which were previously omitted:

waiting for 6 resources: http://localhost:9333/bar, tcp:localhost:9333, http://localhost:9444/bar, tcp:localhost:9444, http://localhost:9555/bar, tcp:localhost:9666
waiting for 5 resources: http://localhost:9333/bar, http://localhost:9444/bar, tcp:localhost:9444, http://localhost:9555/bar, tcp:localhost:9666
waiting for 4 resources: http://localhost:9333/bar, http://localhost:9444/bar, http://localhost:9555/bar, tcp:localhost:9666
waiting for 3 resources: http://localhost:9333/bar, http://localhost:9555/bar, tcp:localhost:9666
waiting for 2 resources: http://localhost:9555/bar, tcp:localhost:9666
waiting for 1 resources: tcp:localhost:9666
wait-on(2656) exiting with error Error: timed out waiting for: tcp:localhost:9666
    at MergeMapSubscriber.project (/home/runner/work/fuzzy-winner/fuzzy-winner/node_modules/wait-on/lib/wait-on.js:129:1)
    at MergeMapSubscriber.module.exports.MergeMapSubscriber._tryNext (/home/runner/work/fuzzy-winner/fuzzy-winner/node_modules/rxjs/internal/operators/mergeMap.js:67:1)
    at MergeMapSubscriber.module.exports.MergeMapSubscriber._next (/home/runner/work/fuzzy-winner/fuzzy-winner/node_modules/rxjs/internal/operators/mergeMap.js:57:1)
    at MergeMapSubscriber.module.exports.Subscriber.next (/home/runner/work/fuzzy-winner/fuzzy-winner/node_modules/rxjs/internal/Subscriber.js:66:1)
    at AsyncAction.dispatch [as work] (/home/runner/work/fuzzy-winner/fuzzy-winner/node_modules/rxjs/internal/observable/timer.js:31:1)
    at AsyncAction.module.exports.AsyncAction._execute (/home/runner/work/fuzzy-winner/fuzzy-winner/node_modules/rxjs/internal/scheduler/AsyncAction.js:71:1)
    at AsyncAction.module.exports.AsyncAction.execute (/home/runner/work/fuzzy-winner/fuzzy-winner/node_modules/rxjs/internal/scheduler/AsyncAction.js:59:1)
    at AsyncScheduler.module.exports.AsyncScheduler.flush (/home/runner/work/fuzzy-winner/fuzzy-winner/node_modules/rxjs/internal/scheduler/AsyncScheduler.js:52:1)
    at listOnTimeout (internal/timers.js:531:17)
    at processTimers (internal/timers.js:475:7)

With the quick/nasty check in place now, we omit stack traces for errors that look like our timeout errors.

waiting for 6 resources: http://localhost:9333/bar, tcp:localhost:9333, http://localhost:9444/bar, tcp:localhost:9444, http://localhost:9555/bar, tcp:localhost:9666
waiting for 5 resources: http://localhost:9333/bar, http://localhost:9444/bar, tcp:localhost:9444, http://localhost:9555/bar, tcp:localhost:9666
waiting for 4 resources: http://localhost:9444/bar, tcp:localhost:9444, http://localhost:9555/bar, tcp:localhost:9666
waiting for 3 resources: http://localhost:9444/bar, http://localhost:9555/bar, tcp:localhost:9666
waiting for 2 resources: http://localhost:9555/bar, tcp:localhost:9666
waiting for 1 resources: tcp:localhost:9666
wait-on(2557) exiting with error; timed out waiting for: tcp:localhost:9666

@jeffbski
Copy link
Owner

jeffbski commented Aug 8, 2020

Thanks @jmealo for taking the time to improve wait-on. I'll comment back here with the npm release it lands in.

@jeffbski jeffbski merged commit 4cfa9fc into jeffbski:master Aug 8, 2020
@jeffbski
Copy link
Owner

jeffbski commented Aug 8, 2020

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

Successfully merging this pull request may close these issues.

None yet

2 participants