Sha256: 8fe4bfcc1c49794a1ed3a0a7f2e93652c23c536f6950697296ca506211d2a827
Contents?: true
Size: 566 Bytes
Versions: 2
Compression:
Stored size: 566 Bytes
Contents
# frozen_string_literal: true require "coveralls" Coveralls.wear! require "nio" require "support/selectable_examples" require "rspec/retry" RSpec.configure do |config| config.disable_monkey_patching! config.verbose_retry = true config.display_try_failure_messages = true end $current_tcp_port = 10_000 def next_available_tcp_port loop do $current_tcp_port += 1 begin sock = Timeout.timeout(1) { TCPSocket.new("localhost", $current_tcp_port) } rescue Errno::ECONNREFUSED break $current_tcp_port end sock.close end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nio4r-2.1.0-java | spec/spec_helper.rb |
nio4r-2.1.0 | spec/spec_helper.rb |