Commit cae17352 authored by Shinya Maeda's avatar Shinya Maeda

Fix typos and add a small spec

parent f9b821f0
......@@ -130,7 +130,7 @@ describe Ci::Build do
context 'when build does not have live trace' do
let!(:build) { create(:ci_build, :success, :trace_artifact) }
it 'selects the build' do
it 'does not select the build' do
is_expected.to be_empty
end
end
......
......@@ -246,12 +246,14 @@ shared_examples_for 'common trace features' do
expect(build.job_artifacts_trace).to be_exist
end
context 'when anothe process had already been archiving', :clean_gitlab_redis_shared_state do
context 'when another process has already been archiving', :clean_gitlab_redis_shared_state do
before do
Gitlab::ExclusiveLease.new("trace:archive:#{trace.job.id}", timeout: 1.hour).try_obtain
end
it 'prevents to archive concurently' do
it 'blocks concurrent archiving' do
expect(Rails.logger).to receive(:error).with('Cannot obtain an exclusive lease. There must be another instance already in execution.')
subject
build.reload
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment