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.23.3 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.23.2 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.23.1 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.23.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.22.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.21.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.20.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.19.2 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.19.1 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.19.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.18.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.17.1 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.17.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.16.1 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.16.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.15.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.14.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.13.1 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.13.0 db/test/backwards_compatibility/spec/support/request_helpers.rb
pact_broker-2.12.0 db/test/backwards_compatibility/spec/support/request_helpers.rb