reorder the initdone; add sync for new primary
on last test case