Preventing phantom restart in test