luisobo / Nocilla

Testing HTTP requests has never been easier. Nocilla: Stunning HTTP stubbing for iOS and Mac OS X.
https://twitter.com/luisobo
MIT License
1.84k stars 172 forks source link

Ability to Delay a Response #123

Open paudav opened 9 years ago

paudav commented 9 years ago

In certain test cases, we want to build up a backlog of requests that are waiting on answers from the network.

In our test setup, Nocilla seems like the right place to do this, but it doesn't seem to be possible with the current implementation. I noticed, however, that there's a pending merge request for this feature in #122.

Is this something you'll consider adding?

pcantrell commented 9 years ago

I need this too. The use cases are:

  1. making assertions about tracking of requests in progress, and
  2. canceling requests.

Attempting either of these in Nocilla as it stands creates a race condition.

I’ve submitted a PR. See if you like the approach.