Fix intermittent test hang.