Test automation flakiness

Various fixes to combat a 1-2% flakiness