-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Description
An error occurred in an `after(:context)` hook.
Failure/Error: @app.run_multi("ls") { |out| expect(out).to include("Gemfile") }
expected "" to include "Gemfile"
# ./spec/hatchet/app_spec.rb:217:in `block (4 levels) in <top (required)>'
# ./lib/hatchet/app.rb:240:in `block in run_multi'
RSpec::Retry: 2nd try ./spec/hatchet/app_spec.rb:174
.
Finished in 22.84 seconds (files took 2.11 seconds to load)
2 examples, 0 failures, 1 error occurred outside of examples
For whatever reason sometimes heroku run <command> comes back empty. I wish I knew why and I would fix it, but until then we're managing the situation through relying on rspec-retry. The problem is that the logic in this test doesn't propagate while inside of the test context but instead in the after(:all) step:
before(:all) do
skip("Must set HATCHET_EXPENSIVE_MODE") unless ENV["HATCHET_EXPENSIVE_MODE"]
@app = Hatchet::GitApp.new("default_ruby", run_multi: true)
@app.deploy
end
after(:all) do
@app.teardown! if @app # <====== ERROR fires here because it's where we're waiting on threads to join
end
it "test one" do
@app.run_multi("ls") { |out| expect(out).to include("Gemfile") } # <== This is where the thread is spawned that the error comes from
expect(@app.platform_api.formation.list(@app.name).detect {|ps| ps["type"] == "web"}["size"].downcase).to_not eq("free")
endMetadata
Metadata
Assignees
Labels
No labels