xetorthio / shmock

Simple HTTP Mocking Library
MIT License
101 stars 20 forks source link

Fix delay variable name to avoid shadowing delay() fx #9

Closed tinchogob closed 9 years ago

tinchogob commented 10 years ago

This shadowing caused some race conditions if multiple requests were made at the same time because reply() was made always async allowing to some requests to be handled before expectation was met and removed from the router.

kylezeeuwen commented 10 years ago

Hi,

We made a similar fix in this commit : https://github.com/onthehouse/shmock/commit/be5b35a6f60ed65018e8d67075518105475b9874

The commit I reference fixes an additional issue where the assertion is not being removed immediately, but only after the delay has passed. This might also be causing you issues.

Cheers Kyle