Skip to content

Commit

Permalink
Merge pull request #339 from richardc/pcp_client_0.2.0
Browse files Browse the repository at this point in the history
Make use of ruby-pcp-client 0.2.0
  • Loading branch information
James Stocks committed Feb 18, 2016
2 parents 0dca91f + 7b02c91 commit c745e9d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion acceptance/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ gem 'beaker', *location_for(ENV['BEAKER_VERSION'] || '~> 2.19')
gem "beaker-hostgenerator", *location_for(ENV['BEAKER_HOSTGENERATOR_VERSION'] || "~> 0.2")
gem 'rake'
gem 'scooter', '~> 3.1.1'
gem 'pcp-client', :source => 'https://rubygems.org'
gem 'pcp-client', '~> 0.2.0'

group(:test) do
gem 'rspec', '~> 2.14.0', :require => false
Expand Down
6 changes: 4 additions & 2 deletions acceptance/lib/pxp-agent/test_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require 'pxp-agent/config_helper.rb'
require 'pcp/client'
require 'pcp/simple_logger'
require 'net/http'
require 'openssl'
require 'json'
Expand Down Expand Up @@ -285,16 +286,17 @@ def connect_pcp_client(broker)
:server => broker_ws_uri(broker),
:ssl_cert => "../test-resources/ssl/certs/controller01.example.com.pem",
:ssl_key => "../test-resources/ssl/private_keys/controller01.example.com.pem",
:logger => PCP::SimpleLogger.new,
:loglevel => logger.is_debug? ? Logger::DEBUG : Logger::WARN
})
connected = client.connect(5)
retries += 1
end
if !connected
raise "Controller PCP client failed to connect with pcp-broker on #{broker} after #{max_retries} attempts"
raise "Controller PCP client failed to connect with pcp-broker on #{broker} after #{max_retries} attempts: #{client.inspect}"
end
if !client.associated?
raise "Controller PCP client failed to associate with pcp-broker on #{broker}"
raise "Controller PCP client failed to associate with pcp-broker on #{broker} #{client.inspect}"
end

client
Expand Down

0 comments on commit c745e9d

Please sign in to comment.