Fix possible test flakyness
Merge pull request #2904 from davidegrohmann/2.1-fix-test-flakyness

Fix possible test flakyness