mjhm / cucumber-api

Cucumber JS step definitions for API testing
MIT License
0 stars 0 forks source link

Launching child process has race condition #3

Open mjhm opened 8 years ago

mjhm commented 8 years ago

https://github.com/mjhm/cucumber-api/blob/master/example/testapp/apitest/features/support/feature_hooks.js#L10

I noticed that occasionally the tests started executing before the server was ready. Probably the most straightforward approach here is to set up polling to ping a server route, and then run done() when it comes back happy.

allonsy commented 8 years ago

I noticed that for some other tests (which is why some exec calls are synchronous) but didn't solve the server one (considering it is an ongoing process). I can work with a couple solutions, including the ping one and see which one is the most elegant.