diff --git a/lib/vagrant/actions/vm/boot.rb b/lib/vagrant/actions/vm/boot.rb index b0ff0d3ab..65b358ff6 100644 --- a/lib/vagrant/actions/vm/boot.rb +++ b/lib/vagrant/actions/vm/boot.rb @@ -26,7 +26,7 @@ error @runner.vm.start(:headless, true) end - def wait_for_boot(sleeptime=5) + def wait_for_boot logger.info "Waiting for VM to boot..." Vagrant.config[:ssh][:max_tries].to_i.times do |i| @@ -36,8 +36,6 @@ error logger.info "VM booted and ready for use!" return true end - - sleep sleeptime end logger.info "Failed to connect to VM! Failed to boot?" diff --git a/test/vagrant/actions/vm/boot_test.rb b/test/vagrant/actions/vm/boot_test.rb index 52c2cef28..7a11ba77f 100644 --- a/test/vagrant/actions/vm/boot_test.rb +++ b/test/vagrant/actions/vm/boot_test.rb @@ -44,12 +44,12 @@ class BootActionTest < Test::Unit::TestCase seq = sequence('pings') Vagrant::SSH.expects(:up?).times(Vagrant.config[:ssh][:max_tries].to_i - 1).returns(false).in_sequence(seq) Vagrant::SSH.expects(:up?).once.returns(true).in_sequence(seq) - assert @action.wait_for_boot(0) + assert @action.wait_for_boot end should "ping the max number of times then just return" do Vagrant::SSH.expects(:up?).times(Vagrant.config[:ssh][:max_tries].to_i).returns(false) - assert !@action.wait_for_boot(0) + assert !@action.wait_for_boot end end end