starting vm test was handing, fixed and moved sleep ping loop to after initial check
This commit is contained in:
parent
dccfeafa2e
commit
8c2068565b
|
@ -174,13 +174,14 @@ error
|
|||
logger.info "Waiting for VM to boot..."
|
||||
|
||||
Hobo.config[:ssh][:max_tries].to_i.times do |i|
|
||||
sleep 5 unless ENV['HOBO_ENV'] == 'test'
|
||||
logger.info "Trying to connect (attempt ##{i+1} of #{Hobo.config[:ssh][:max_tries]})..."
|
||||
|
||||
if Hobo::SSH.up?
|
||||
logger.info "VM booted and ready for use!"
|
||||
return true
|
||||
end
|
||||
|
||||
sleep 5 unless ENV['HOBO_ENV'] == 'test'
|
||||
end
|
||||
|
||||
logger.info "Failed to connect to VM! Failed to boot?"
|
||||
|
|
|
@ -113,6 +113,7 @@ class VMTest < Test::Unit::TestCase
|
|||
|
||||
should "start the VM in headless mode" do
|
||||
@mock_vm.expects(:start).with(:headless, true).once
|
||||
Hobo::SSH.expects(:up?).once.returns(true)
|
||||
@vm.start
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue