Skip to content
代码片段 群组 项目
未验证 提交 bdf5e2db 编辑于 作者: Patrick Bajao's avatar Patrick Bajao 提交者: GitLab
浏览文件

Merge branch 'fix-a-flaky-draft_notes_publish_service_spec' into 'master'

Fix a flaky spec caused by the use of let_it_be

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/150219



Merged-by: default avatarPatrick Bajao <ebajao@gitlab.com>
Approved-by: default avatarPatrick Bajao <ebajao@gitlab.com>
Co-authored-by: default avatarDavid Kim <dkim@gitlab.com>
No related branches found
No related tags found
无相关合并请求
......@@ -185,16 +185,21 @@ def publish(draft: nil)
end
end
it 'does not request a lot from Gitaly', :request_store, :clean_gitlab_redis_cache do
merge_request
position
context 'checking gitaly calls' do
# NOTE: This was added to avoid test flakiness.
let(:merge_request) { create(:merge_request) }
Gitlab::GitalyClient.reset_counts
it 'does not request a lot from Gitaly', :request_store, :clean_gitlab_redis_cache do
merge_request
position
# NOTE: This should be reduced as we work on reducing Gitaly calls.
# Gitaly requests shouldn't go above this threshold as much as possible
# as it may add more to the Gitaly N+1 issue we are experiencing.
expect { publish }.to change { Gitlab::GitalyClient.get_request_count }.by(19)
Gitlab::GitalyClient.reset_counts
# NOTE: This should be reduced as we work on reducing Gitaly calls.
# Gitaly requests shouldn't go above this threshold as much as possible
# as it may add more to the Gitaly N+1 issue we are experiencing.
expect { publish }.to change { Gitlab::GitalyClient.get_request_count }.by(19)
end
end
end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册