Fix possible test flakyness