unify reorder test logic and add granular retry [fixes #299]