Skip to content

Commit

Permalink
Disable "bullet" gem in test env
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur Beljajev committed Oct 12, 2017
1 parent 86e5af6 commit 56d909c
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,6 @@
# The available log levels are: :debug, :info, :warn, :error, :fatal, and :unknown,
# corresponding to the log level numbers from 0 up to 5 respectively
config.log_level = :debug

# for finding database optimization
config.after_initialize do
Bullet.enable = true
Bullet.bullet_logger = true
Bullet.rails_logger = true
Bullet.raise = false # raise an error if n+1 query occurs
Bullet.unused_eager_loading_enable = false

# Currenty hard to fix, it is triggered by Epp::Domain.new_from_epp for create request
Bullet.add_whitelist type: :n_plus_one_query, class_name: 'Contact', association: :registrar

# when domain updates, then we need to update all contact linked status,
# somehow it triggers bullet counter cache for versions,
# there was no output indicating each version where fetched or counted
# thus needs more investigation
Bullet.add_whitelist type: :counter_cache, class_name: 'Contact', association: :versions
end

config.active_job.queue_adapter = :test
config.logger = ActiveSupport::Logger.new(nil)
end
Expand Down

0 comments on commit 56d909c

Please sign in to comment.