Resolve transient failures related to testing migrations
What does this MR do?
It attempts to resolve transient failures that sometimes occur in tests that follow migrations specs.
What are the relevant issue numbers?
Closes gitlab-org/gitlab-ce#36745
Edited by Grzegorz Bizon