Fix racy integration tests Upstream-commit: 47cb56f20f65ade23fed1eec8bb9f2645e31300a Component: engine