test/integration/integration_test.rb in propono-1.7.0 vs test/integration/integration_test.rb in propono-2.0.0.rc1

- old
+ new

@@ -1,25 +1,22 @@ require File.expand_path('../../test_helper', __FILE__) module Propono class IntegrationTest < Minitest::Test - def setup - super - Fog.unmock! + def propono_client config_file = YAML.load_file( File.expand_path('../../config.yml', __FILE__)) - Propono.config do |config| + @propono_client ||= Propono::Client.new do |config| config.access_key = config_file['access_key'] config.secret_key = config_file['secret_key'] config.queue_region = config_file['queue_region'] config.application_name = config_file['application_name'] - config.udp_host = "localhost" end end # Wait a max of 20secs before failing the test - def wait_for_thread(thread) - 200.times do |x| + def wait_for_thread(thread, secs = 20) + (secs * 10).times do |x| return true unless thread.alive? sleep(0.1) end false end