Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Commit

Permalink
Merge "Fix failed base recover unit test." into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
kushmerick authored and Gerrit Code Review committed Jun 30, 2011
2 parents cab5970 + 78aeed9 commit 1c6a7fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion base/spec/base_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def self.sec(index, &blk)
Do.at(2) { node = ProvisionerTests.create_node(1) }
Do.at(3) { gateway.send_provision_request }
Do.at(4) { gateway.send_recover_request }
Do.at(5) { EM.stop }
Do.at(10) { EM.stop }
end
gateway.got_recover_response.should be_true
end
Expand Down
4 changes: 3 additions & 1 deletion base/spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,9 @@ def send_restore_request
end
end
def send_recover_request
@provisioner.recover(@instance_id, nil, [{'service_id' => @instance_id, 'configuration' => {}}]) do |res|
# register a fake callback to provisioner which always return true
@provisioner.register_update_handle_callback{|handle, &blk| blk.call(true)}
@provisioner.recover(@instance_id, nil, [{'service_id' => @instance_id, 'configuration' => {}},{'service_id' => 'fake_uuid', 'configuratiion' => {}, 'credentials'=>{'name' => @instance_id}}]) do |res|
@got_recover_response = res['success']
end
end
Expand Down

0 comments on commit 1c6a7fe

Please sign in to comment.