Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2017-05-19 17:17:47 +0300
committerStan Hu <stanhu@gmail.com>2017-05-19 17:17:47 +0300
commit9d29eb7e292067fb980b4ca97fc6c3edac1dccec (patch)
treed9e1d2fccab2dab90d1fed9d47a30c402921e1ca
parent9bf95ddd83fd3ef1216952692ff789d7c5688578 (diff)
parent29c268ee4e21470cb7bbf13ce16b527b516225cb (diff)
Merge branch '31933-improve-rspec-profiling-enabling' into 'master'
Enable RSpec profiling only if RSPEC_PROFILING_POSTGRES_URL is not empty Closes #31933 See merge request !11543
-rw-r--r--config/initializers/rspec_profiling.rb2
-rw-r--r--spec/spec_helper.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/config/initializers/rspec_profiling.rb b/config/initializers/rspec_profiling.rb
index a7efd74f09e..16b9d5b15e5 100644
--- a/config/initializers/rspec_profiling.rb
+++ b/config/initializers/rspec_profiling.rb
@@ -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
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index e2d5928e5b2..a58f4e664b7 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -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' &&