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

Allow query counts to be less than expectation

This covers an edge case where tests in single db mode may use less
queries to cover the same data requests
上级 6771be9e
No related branches found
No related tags found
无相关合并请求
......@@ -42,7 +42,10 @@
export_segment
end.count
expect(query_count).to eq(expected_export_query_count)
# In single DB mode some queries may be concatenated, resulting in less than the expected
# query count, so we permit less to cover this.
# See https://gitlab.com/gitlab-org/gitlab/-/issues/524755
expect(query_count).to be <= expected_export_query_count
end
end
......@@ -270,7 +273,7 @@
export
end.count
expect(query_count).to eq(12)
expect(query_count).to be <= 12
end
it 'sets organization_id appropriately' do
......
......@@ -120,11 +120,17 @@
end
end
context 'when schema is gitlab_ci' do
let(:gitlab_schema) { 'gitlab_ci' }
context 'when using multiple databases' do
before do
skip_if_shared_database(:ci)
end
it 'returns the database name' do
expect(database_name).to eq(database_exists?(:ci) ? 'ci' : 'main')
context 'when schema is gitlab_ci' do
let(:gitlab_schema) { 'gitlab_ci' }
it 'returns the database name' do
expect(database_name).to eq('ci')
end
end
end
end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册