1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test
Kir Shatrov 2038cc6cab
Make Socket.getaddrinfo interruptible (#2827)
Before, Socket.getaddrinfo was using a blocking getaddrinfo(3) call.
That didn't allow to wrap it into Timeout.timeout or interrupt the thread in any way.

Combined with the default 10 sec resolv timeout on many Unix systems, this can
have a very noticeable effect on production Ruby apps being not
resilient to DNS outages and timing out name resolution, and being unable to fail fast even
with Timeout.timeout.

Since we already have support for getaddrinfo_a(3), the async version
of getaddrinfo, we should be able to make Socket.getaddrinfo leverage that
when getaddrinfo_a version is available in the system (hence #ifdef
HAVE_GETADDRINFO_A).

Related tickets:
https://bugs.ruby-lang.org/issues/16476
https://bugs.ruby-lang.org/issues/16381
https://bugs.ruby-lang.org/issues/14997
2020-08-27 16:39:13 +09:00
..
-ext- vm_backtrace.c: let rb_profile_frames show cfunc frames 2020-07-28 13:18:08 +09:00
base64
benchmark
bigdecimal bidecimal: improve tests' independence (#3297) 2020-07-12 17:30:29 +09:00
cgi
coverage test/coverage/test_coverage.rb: Add a test for [Bug #16967] 2020-06-20 09:28:03 +09:00
csv [ruby/csv] CSV.generate_line: use the encoding of the first non ASCII field as the expected encoding 2020-07-20 02:32:55 +09:00
date [ruby/date] Fix cannot load complex into simple error when loading marshal dump (Fixes #20) 2020-06-20 18:35:03 +09:00
dbm
did_you_mean
digest
drb
dtrace
erb Fixup 3292f4d965 2020-08-21 20:40:26 +09:00
etc
excludes
fiber test/fiber/test_backtrace.rb: prevent a warning 2020-08-18 14:36:39 +09:00
fiddle Apply timeout-scale to test_nogvl_poll. 2020-07-30 18:28:41 +09:00
fileutils Fix Encoding::CompatibilityError in FileUtils::Entry_#join 2020-06-22 18:34:24 +09:00
gdbm
io Add explicitly require for Dir.mktmpdir 2020-07-30 21:01:22 +09:00
irb Skip irb/test_history on Windows too 2020-08-20 13:24:55 +09:00
json test/json/json_fixtures_test.rb: Prevent an "out of range" warning 2020-07-03 11:47:09 +09:00
lib
logger
matrix
mkmf Make the mkmf methods private in the global [Bug #16896] 2020-07-13 18:44:22 +09:00
monitor Fix MonitorMixin when the super's initialize has kwargs 2020-07-17 16:37:18 -07:00
net [ruby/net-http] Fix SSL session reuse test with LibreSSL 3.2+ 2020-08-03 18:56:14 +09:00
nkf
objspace Fix ObjectSpace.trace_object_allocations_stop to not raise if the tracepoint were not initialized 2020-08-19 08:13:09 -07:00
open-uri Remove the deprecated override of Kernel#open in open-uri 2020-08-16 07:41:40 -07:00
openssl Test out fix for OpenSSL test flakiness 2020-08-11 12:01:51 -04:00
optparse
ostruct
pathname Prefer more descriptive assertion methods 2020-06-21 11:31:48 +09:00
psych [ruby/psych] Fix anchor lookup with symbolized names 2020-06-23 15:26:29 +09:00
racc
rdoc Use https instead of http 2020-07-28 19:51:54 +09:00
readline Suppress bell during the test 2020-07-18 19:33:11 +09:00
reline [ruby/reline] Keep original characters in inputrc 2020-08-18 19:08:40 +09:00
resolv
rinda Revert "Try increasing read timeout of rinda tests" 2020-06-26 22:43:59 -07:00
ripper Drop token info for endless method definition 2020-06-25 01:14:26 +09:00
ruby Fixed error messages at non-ascii %string terminator 2020-08-26 21:36:22 +09:00
rubygems [rubygems/rubygems] Enable Layout/LeadingEmptyLines in rubygems 2020-07-31 21:07:19 +09:00
socket Make Socket.getaddrinfo interruptible (#2827) 2020-08-27 16:39:13 +09:00
stringio [ruby/stringio] No compatibility check in US-ASCII case 2020-07-20 14:59:19 +09:00
strscan
syslog
uri
webrick Add tests of nested multibyte path and DirectoryIndex 2020-06-22 17:31:07 +09:00
win32ole
yaml
zlib
runner.rb
test_abbrev.rb
test_delegate.rb Add instance_methods to class generated by DelegateClass 2020-07-09 15:01:10 -07:00
test_extlibs.rb Removed sdbm entries from toolchanins 2020-06-19 08:26:47 +09:00
test_find.rb
test_forwardable.rb
test_ipaddr.rb
test_mutex_m.rb
test_observer.rb
test_open3.rb [open3] only close streams if a block is passed 2020-06-18 10:00:20 -07:00
test_pp.rb
test_prettyprint.rb
test_prime.rb
test_pstore.rb
test_pty.rb
test_rbconfig.rb
test_securerandom.rb
test_set.rb
test_shellwords.rb
test_singleton.rb
test_syslog.rb
test_tempfile.rb
test_time.rb
test_timeout.rb
test_tmpdir.rb
test_tracer.rb
test_tsort.rb
test_unicode_normalize.rb
test_weakref.rb
test_win32api.rb