Avoid showing stack traces during test runs.
Run the event loop a bit to avoid race conditions.