add builder for LocalManagementContextForTests and use in more places to speed things up
fix ha split brain test problem, and better logging for ha