summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-06-04 14:12:45 +0900
committerShinya Maeda <shinya@gitlab.com>2018-06-05 20:00:21 +0900
commit737c623abb8af30a92ce5713e4bf625609aeec55 (patch)
tree2aac1972856440220f242a74a0489c85bcfacc8a
parentf2e02d797e3146aedfb4e88cdb4fcc10b71ed26e (diff)
downloadgitlab-ce-live-trace-v2-persist-data.tar.gz
Fix typos and add a small speclive-trace-v2-persist-data
-rw-r--r--spec/models/ci/build_spec.rb2
-rw-r--r--spec/support/shared_examples/ci_trace_shared_examples.rb6
2 files changed, 5 insertions, 3 deletions
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb
index 5cb0ad1413e..b452f4e3321 100644
--- a/spec/models/ci/build_spec.rb
+++ b/spec/models/ci/build_spec.rb
@@ -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
diff --git a/spec/support/shared_examples/ci_trace_shared_examples.rb b/spec/support/shared_examples/ci_trace_shared_examples.rb
index 59efce1b5f0..6dbe0f6f980 100644
--- a/spec/support/shared_examples/ci_trace_shared_examples.rb
+++ b/spec/support/shared_examples/ci_trace_shared_examples.rb
@@ -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