Ensure backends have no pending main context events after unprepare()
@pwithnall
Submitted by Philip Withnall Assigned to fol..@..e.bugs
Link to original bug (#727700)
Description
To make sure there is no interference between unit tests caused by undispatched events in the global default main context, we should make sure that all backends and persona stores guarantee to have no pending main context events by the time their unprepare() methods return.
This is generally a good idea anyway, not just for unit tests.
Currently, the unit tests manually iterate the global default main context until no events are left; those FIXMEs should be removed as part of the fix for this bug.
Version: git master