Sha256: 8bfe6efb31391da4d934dc1eabcf8f97b743a4bb86c8200f01ec76aa98cefa4d

Contents?: true

Size: 684 Bytes

Versions: 74

Compression:

Stored size: 684 Bytes

Contents

class TCPSocket

  def self.wait_for_service_with_timeout(options)
    start_time = Time.now

    until listening_service?(options)
      verbose_wait

      if options[:timeout] && (Time.now > start_time + options[:timeout])
        raise SocketError.new("Socket did not open within #{options[:timeout]} seconds")
      end
    end
  end

  def self.wait_for_service_termination_with_timeout(options)
    start_time = Time.now

    while listening_service?(options)
      verbose_wait

      if options[:timeout] && (Time.now > start_time + options[:timeout])
        raise SocketError.new("Socket did not terminate within #{options[:timeout]} seconds")
      end
    end
  end

end

Version data entries

74 entries across 74 versions & 30 rubygems

Version Path
aslakhellesoy-webrat-0.4.4.1 lib/webrat/core_extensions/tcp_socket.rb
casebook-webrat-0.4.4.1 lib/webrat/core_extensions/tcp_socket.rb
cavalle-webrat-0.4.4.1 lib/webrat/core_extensions/tcp_socket.rb
cavalle-webrat-0.4.4.2 lib/webrat/core_extensions/tcp_socket.rb
davidtrogers-webrat-0.4.4.2 lib/webrat/core_extensions/tcp_socket.rb
diabolo-webrat-0.4.4.1 lib/webrat/core_extensions/tcp_socket.rb
diabolo-webrat-0.4.4.2 lib/webrat/core_extensions/tcp_socket.rb
diabolo-webrat-0.4.4 lib/webrat/core_extensions/tcp_socket.rb
diabolo-webrat-0.5.1 lib/webrat/core_extensions/tcp_socket.rb
dstrelau-webrat-0.5.1 lib/webrat/core_extensions/tcp_socket.rb
emipair-webrat-0.0.1 lib/webrat/core_extensions/tcp_socket.rb
futuresinc-webrat-0.4.4.100 lib/webrat/core_extensions/tcp_socket.rb
futuresinc-webrat-0.4.4.99 lib/webrat/core_extensions/tcp_socket.rb
garnierjm-webrat-0.4.5 lib/webrat/core_extensions/tcp_socket.rb
hardbap-webrat-0.5.1 lib/webrat/core_extensions/tcp_socket.rb
hardbap-webrat-0.5.2 lib/webrat/core_extensions/tcp_socket.rb
jwilger-webrat-0.4.4.2 lib/webrat/core_extensions/tcp_socket.rb
jwilger-webrat-0.4.4.3 lib/webrat/core_extensions/tcp_socket.rb
jwilger-webrat-0.4.4.4 lib/webrat/core_extensions/tcp_socket.rb
jwilger-webrat-0.4.4.5 lib/webrat/core_extensions/tcp_socket.rb