Adds macro while-timout to avoid test hangs
Merge pull request #692 from d2r/d2r-testing-while-timeout

Adds macro while-timout to avoid test hangs