Commit 72ec0eb4 authored by Stan Hu's avatar Stan Hu

Disable transaction checks for threaded spec

This test creates two threads to simulate a race condition, but the
transaction detection isn't thread safe so it picks up transactions from
the other thread.

Since the transaction check doesn't work properly in this test, we
disable it to work around the problem.

Closes https://gitlab.com/gitlab-org/gitlab/-/issues/295474
parent 9c537f99
......@@ -238,11 +238,15 @@ RSpec.describe 'Merge request > User sees pipelines', :js do
threads = []
threads << Thread.new do
@merge_request = MergeRequests::CreateService.new(project, user, merge_request_params).execute
Sidekiq::Worker.skipping_transaction_check do
@merge_request = MergeRequests::CreateService.new(project, user, merge_request_params).execute
end
end
threads << Thread.new do
@pipeline = Ci::CreatePipelineService.new(project, user, build_push_data).execute(:push)
Sidekiq::Worker.skipping_transaction_check do
@pipeline = Ci::CreatePipelineService.new(project, user, build_push_data).execute(:push)
end
end
threads.each { |thr| thr.join }
......
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