Skip to content
Snippets Groups Projects
Verified Commit 29c268ee authored by Rémy Coutable's avatar Rémy Coutable
Browse files

Enable RSpec profiling only if RSPEC_PROFILING_POSTGRES_URL is not empty


Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 0bce9872
No related branches found
No related tags found
2 merge requests!12073Add RC2 changes to 9-3-stable,!11543Enable RSpec profiling only if RSPEC_PROFILING_POSTGRES_URL is not empty
Loading
Loading
@@ -32,7 +32,7 @@ end
 
if Rails.env.test?
RspecProfiling.configure do |config|
if ENV['RSPEC_PROFILING_POSTGRES_URL']
if ENV['RSPEC_PROFILING_POSTGRES_URL'].present?
RspecProfiling::Collectors::PSQL.prepend(RspecProfilingExt::PSQL)
config.collector = RspecProfiling::Collectors::PSQL
end
Loading
Loading
Loading
Loading
@@ -10,7 +10,7 @@ require 'shoulda/matchers'
require 'rspec/retry'
 
rspec_profiling_is_configured =
ENV['RSPEC_PROFILING_POSTGRES_URL'] ||
ENV['RSPEC_PROFILING_POSTGRES_URL'].present? ||
ENV['RSPEC_PROFILING']
branch_can_be_profiled =
ENV['GITLAB_DATABASE'] == 'postgresql' &&
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment