Skip to content
代码片段 群组 项目
提交 ee6604f2 编辑于 作者: Albert Salim's avatar Albert Salim
浏览文件

Fix flaky spec due to ordering

上级 9b815fe5
加载中
......@@ -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] }
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([namespace_4, namespace_5])
expect(service).to receive(:reset_ci_minutes!).with(match_array([namespace_1, namespace_2, namespace_3]))
expect(service).to receive(:reset_ci_minutes!).with(match_array([namespace_4, namespace_5]))
subject
end
......@@ -75,8 +75,8 @@ def create_namespace_with_project(seconds_used, monthly_minutes_limit = nil)
end
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([namespace_4, namespace_5]).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(match_array([namespace_4, namespace_5])).and_call_original
expect { subject }
.to raise_error(described_class::BatchNotResetError) do |error|
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册