# File lib/god/conditions/socket_responding.rb, line 104 def test self.info = [] if self.family == 'tcp' begin s = TCPSocket.new(self.addr, self.port) rescue SystemCallError end status = s.nil? elsif self.family == 'unix' begin s = UNIXSocket.new(self.path) rescue SystemCallError end status = s.nil? else status = false end @timeline.push(status) history = "[" + @timeline.map {|t| t ? '*' : ''}.join(',') + "]" if @timeline.select { |x| x }.size >= self.times.first self.info = "socket out of bounds #{history}" return true else return false end end