Change terminate test not to spam the event loop with so many messages