Skip to content
代码片段 群组 项目
提交 bfd2e37c 编辑于 作者: Heinrich Lee Yu's avatar Heinrich Lee Yu
浏览文件

Merge branch '344102-fix-flaky-spec' into 'master'

Fix flaky spec due to ordering

See merge request gitlab-org/gitlab!90882
No related branches found
No related tags found
无相关合并请求
...@@ -46,8 +46,8 @@ def create_namespace_with_project(seconds_used, monthly_minutes_limit = nil) ...@@ -46,8 +46,8 @@ def create_namespace_with_project(seconds_used, monthly_minutes_limit = nil)
let(:namespaces_exceeding_minutes) { [namespace_1, namespace_2, namespace_3] } let(:namespaces_exceeding_minutes) { [namespace_1, namespace_2, namespace_3] }
it 'resets minutes in batches for the given range and ignores project namespaces' do it 'resets minutes in batches for the given range and ignores project namespaces' do
expect(service).to receive(:reset_ci_minutes!).with([namespace_1, namespace_2, namespace_3]) expect(service).to receive(:reset_ci_minutes!).with(match_array([namespace_1, namespace_2, namespace_3]))
expect(service).to receive(:reset_ci_minutes!).with([namespace_4, namespace_5]) expect(service).to receive(:reset_ci_minutes!).with(match_array([namespace_4, namespace_5]))
subject subject
end end
...@@ -75,8 +75,8 @@ def create_namespace_with_project(seconds_used, monthly_minutes_limit = nil) ...@@ -75,8 +75,8 @@ def create_namespace_with_project(seconds_used, monthly_minutes_limit = nil)
end end
it 'continues its progress and raises exception at the end' do it 'continues its progress and raises exception at the end' do
expect(service).to receive(:reset_ci_minutes!).with([namespace_1, namespace_2, namespace_3]).and_call_original expect(service).to receive(:reset_ci_minutes!).with(match_array([namespace_1, namespace_2, namespace_3])).and_call_original
expect(service).to receive(:reset_ci_minutes!).with([namespace_4, namespace_5]).and_call_original expect(service).to receive(:reset_ci_minutes!).with(match_array([namespace_4, namespace_5])).and_call_original
expect { subject } expect { subject }
.to raise_error(described_class::BatchNotResetError) do |error| .to raise_error(described_class::BatchNotResetError) do |error|
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册