Sha256: 0634032f3cd060772c421636630563b0b2b1e54575b210d9e5e1de1a979bf29c

Contents?: true

Size: 345 Bytes

Versions: 12

Compression:

Stored size: 345 Bytes

Contents

module RequestHelpers
  def wait_for_server_to_start
    unless ENV["OK"]
      retries = 0
      begin
        get "/"
        ENV["OK"] = "true"
      rescue Errno::ECONNREFUSED => error
        if retries < 10
          retries += 1
          sleep 1
          retry
        else
          raise error
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pact_broker-2.89.1 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.89.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.88.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.87.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.86.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.85.1 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.85.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.84.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.83.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.82.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.81.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.80.0 db/test/backwards_compatibility/spec/support/request_helpers.rb