praekeltfoundation / vumi-jssandbox-toolkit

Vumi JavaScript Sandbox toolkit.
BSD 3-Clause "New" or "Revised" License
7 stars 8 forks source link

Add default delay to fixture HTTP calls. #205

Open smn opened 10 years ago

smn commented 10 years ago

Currently the test framework immediately returns results for http calls, that's not how things will happen in production.

Having a configurable delay in the fixtures would help, a default of 100ms would probably be OK? It would help indicate where too many http calls are being made for production (even though they're snappy in the tests).

hodgestar commented 10 years ago

I don't want to add 1/10 or 2/10 of a second to lots of tests in order to catch this. Maybe the dummy API should raise an error if too many HTTP calls are made?