Throw TestFailedOnTimeoutException instead of plain Exception on
timeout. Fixes #771