FAQ / knapsack_pro / Common problems & solutions for knapsack_pro gem usage

Why knapsack_pro freezes / hangs my CI (for instance Travis)?

Timecop gem freeze

Freeze error can occur for example on Travis CI. The timecop gem can result in sporadic freezing due to issues with ordering calls of Timecop.return, Timecop.freeze, and Timecop.travel. For instance, if using RSpec, ensure to have a Timecop.return configured to run after all examples:


# in, e.g. spec/spec_helper.rb
RSpec.configure do |c|
  c.after(:all) do
    Timecop.return
  end
end

Missing --format argument in RSpec can lead to freeze of CI node

Another reason of freeze could be lack of output from RSpec. Please ensure your .rspec file has defined formatter with line:

--format progress

or you can pass formatter to knapsack_pro gem command:


# Regular Mode
bundle exec rake "knapsack_pro:rspec[--format progress]"

# Queue Mode
bundle exec rake "knapsack_pro:queue:rspec[--format progress]"

Start using Knapsack Pro

Sign up and speed up your tests.