spec/dns_spec.rb in libuv-3.0.0 vs spec/dns_spec.rb in libuv-3.0.1
- old
+ new
@@ -7,24 +7,28 @@
@general_failure = []
@reactor = Libuv::Reactor.default
@reactor.notifier do |error, context|
begin
- p "Log called: #{context}\n#{error.message}\n#{error.backtrace.join("\n")}\n"
+ puts "Log called: #{context}\n#{error.message}\n#{error.backtrace.join("\n")}\n"
rescue Exception
- p 'error in logger'
+ puts 'error in logger'
end
end
@timeout = @reactor.timer do
@reactor.stop
@general_failure << "test timed out"
end
@timeout.start(5000)
@reactor.all(@server, @client, @timeout).catch do |reason|
@general_failure << reason.inspect
- p "Failed with: #{reason.message}\n#{reason.backtrace.join("\n")}\n"
+ puts "Failed with: #{reason.message}\n#{reason.backtrace.join("\n")}\n"
end
+ end
+
+ after :each do
+ @reactor.notifier
end
it "should resolve localhost using IP4", :network => true do
@reactor.run { |reactor|
@reactor.lookup('localhost', wait: false).then proc { |addrinfo|