mock-server/mockserver-node

Start server promise always rejected

AleksNFedorov opened this issue · 6 comments

When I try to start server - I always catch an exception in promise catch block, but then server starts and becomes operational.

10 Seconds is not enough to start java server on MacOS (Sierra 10.12), it needs a little bit more. I have fixed that with setting startupRetries to 200

Please make in configurable

Command I use to start server:

mockServer.start_mockserver({
    serverPort: config.port,
    verbose: true
}).then(() => {
    logger.info(`Mock server started on port [${config.port}]`);
    const mockServerClient = mockServer.mockServerClient;

}).catch((err) => {
    logger.info(`Unable to start mockServer [${JSON.stringify(err)}]`);
});

Also getting this problem now on Mojave (10.14.2). @jamesdbloom I'm happy to do a PR for this just want to make sure you haven't abandoned this repo or maybe there is some particular reason why you explicitly don't want this to be an option?

Please do a PR that would be helpful, this issue hasn't received the focus it needs recently because the majority of the recent focus has been on the main https://github.com/jamesdbloom/mockserver repo so a PR would be helpful.

If you can't do a PR I should be able to take a look in the next month or so

Hey man, no worries at all. I'll pull it all down and take a look in the next week or so. Hopefully a PR will be heading your way shortly ;)

Thanks for merging #9 @jamesdbloom any idea of an eta when that might get published through to npm? Hoping to use this as part of my project but can't really until npm pulls down a version of the package with this change in it.

Normally I release a new versions across the board for all components but the new release is not available for the main MockServer application. However, I have bumped the version of the next release for the main MockServer application so I can release a new point version of mockserver-node. It is now released.