Sha256: 69c85f7bc276dcf4ce099c7f12be3424cb980ba8fddd5798bed3355d29ca23dc

Contents?: true

Size: 350 Bytes

Versions: 112

Compression:

Stored size: 350 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

112 entries across 112 versions & 1 rubygems

Version Path
pact_broker-2.79.1 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.79.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.78.1 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.78.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.77.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.76.2 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.76.1 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.76.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.75.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.74.1 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.74.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.73.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.72.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.71.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.70.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.69.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.68.1 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.68.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.67.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.66.0 db/test/backwards_compatibility/spec/support/request_helpers.rb