To avoid test flakiness (and potentially make this faster since often it won't even take 100 millis to do), I prefer to use latches to coordinate the main test thread and the async action.