ruby on rails - Prevent Sidekiq from printing "(...) INFO: Sidekiq client with redis options {}" on tests -


I use the Rail 4 default test framework and have written some tests that give sidekick some work in "background" Let's hope. But when I run the Rock Exam then the results of my test are seen in this way:

  ............. 2014- 08-01T05: 40: 52Z 12000 TID-ABCDF 123 Information: Sidekick Client with Radis Options {} ............................ ...... ... Ended in 3.0s, 9000 runs / s, 150.000 claims / S 30 runs, 400 claims, 0 failures, 0 errors, 0 stops  

Now it looks okay with the tests but the logs of the SideSaike worker are actually disturbed by this log To stop I am trying this in my working class:

  Class MyWorker includes: Sidekick :: Workers Sidekick_Points queue: my_queue def initialize Rails.logger.level = 2 # Set: Warning Level Super End Diff Display (movie_id) # Rails.logger.level = 0 # Back to: Debug Level? # Some code end and << code>  

Both the Rails.logger.level line with comment and uncommented, but the logged line did not disappear. How do I login it from rake test

You can add the following line to your Participatory Starter ( config / initializers / sidekiq.rb ) to turn it on:

  If the rail. Env.test? Sidekiq.logger.level = Wood: :: Warning End  

Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -