calabash/calabash-android — pull request #76 by scompt (2012-08-09 21:07:38+00:00)
Title: Startup sync

This pull request makes the cucumber client poll the backend at the beginning of each scenario asking if the HttpServer has started and loaded all of the actions/instrumentation/etc.

The motivation for this is that running tests on our CI build node were causing lots of timeouts and connection errors at the beginning of the scenarios. I think the problem is that the instrumentation backend was taking longer to startup than cucumber was giving it.

Now, the HttpServer is started as soon as possible in the TestRunner. This means it's ready to respond to requests much earlier in the test process. The instrumentation backend starts loading actions and then notifies the HttpServer that it's ready to start processing test actions.