spec/spec_helper.rb in deimos-ruby-1.0.0.pre.beta22 vs spec/spec_helper.rb in deimos-ruby-1.0.0.pre.beta23
- old
+ new
@@ -5,10 +5,11 @@
require 'deimos'
require 'deimos/metrics/mock'
require 'deimos/tracing/mock'
require 'deimos/test_helpers'
require 'active_support/testing/time_helpers'
+require 'activerecord-import'
# Helpers for Executor/DbProducer
module TestRunners
# Execute a block until it stops failing. This is helpful for testing threads
# where we need to wait for them to continue but don't want to rely on
@@ -139,20 +140,21 @@
config.include ActiveSupport::Testing::TimeHelpers
config.before(:suite) do
Time.zone = 'EST'
ActiveRecord::Base.logger = Logger.new('/dev/null')
setup_db(DbConfigs::DB_OPTIONS.last)
- Deimos.configure do |fr_config|
- fr_config.phobos_config_file = File.join(File.dirname(__FILE__), 'phobos.yml')
- fr_config.schema_path = File.join(File.expand_path(__dir__), 'schemas')
- fr_config.reraise_consumer_errors = true
- fr_config.schema_registry_url = ENV['SCHEMA_REGISTRY'] || 'http://localhost:8081'
- fr_config.seed_broker = ENV['KAFKA_SEED_BROKER'] || 'localhost:9092'
- fr_config.logger = Logger.new('/dev/null')
+ Deimos.configure do |deimos_config|
+ deimos_config.phobos_config_file = File.join(File.dirname(__FILE__), 'phobos.yml')
+ deimos_config.schema_path = File.join(File.expand_path(__dir__), 'schemas')
+ deimos_config.reraise_consumer_errors = true
+ deimos_config.schema_registry_url = ENV['SCHEMA_REGISTRY'] || 'http://localhost:8081'
+ deimos_config.seed_broker = ENV['KAFKA_SEED_BROKER'] || 'localhost:9092'
+ deimos_config.logger = Logger.new('/dev/null')
+ deimos_config.logger.level = Logger::INFO
# Use Mock Metrics and Tracing for rspecs
- fr_config.metrics = Deimos::Metrics::Mock.new
- fr_config.tracer = Deimos::Tracing::Mock.new
+ deimos_config.metrics = Deimos::Metrics::Mock.new
+ deimos_config.tracer = Deimos::Tracing::Mock.new
end
end
config.before(:each) do |ex|
stub_producers_and_consumers! unless ex.metadata[:integration]