spec/test_server.rb in instrumental_agent-0.10.1 vs spec/test_server.rb in instrumental_agent-0.11.0

- old
+ new

@@ -20,11 +20,11 @@ end def listen @port ||= 10001 - @server = TCPServer.new(port) + @server = TCPServer.new(@port) @main_thread = Thread.new do begin # puts "listening" loop do client = @server.accept @@ -64,12 +64,11 @@ retry end end end # puts "server up" - rescue Exception => err - # FIXME: doesn't seem to be detecting failures of listen - puts "failed to get port" + rescue Errno::EADDRINUSE => err + puts "#{err.inspect} failed to get port #{@port}" puts err.message @port += 1 retry end