Skip to content

Commit 6d0ec6a

Browse files
p-mongop
authored andcommitted
Remove resolver override in uri spec test runner (#1279)
1 parent 44b6c68 commit 6d0ec6a

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

spec/spec_tests/uri_options_spec.rb

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,6 @@
1414
# we need to close all clients/stop monitoring to avoid monitoring
1515
# threads warning and interfering with these assertions
1616
ClientRegistry.instance.close_all_clients
17-
18-
module Mongo
19-
class Address
20-
21-
private
22-
23-
alias :original_create_resolver :create_resolver
24-
def create_resolver(timeout, ssl_options)
25-
family = (host == 'localhost') ? ::Socket::AF_INET : ::Socket::AF_UNSPEC
26-
info = ::Socket.getaddrinfo(host, nil, family, ::Socket::SOCK_STREAM)
27-
FAMILY_MAP[info.first[4]].new(info[3], port, host)
28-
end
29-
end
30-
end
31-
end
32-
33-
after(:all) do
34-
35-
module Mongo
36-
# Return the implementations to their originals for the other
37-
# tests in the suite.
38-
class Address
39-
alias :create_resolver :original_create_resolver
40-
remove_method(:original_create_resolver)
41-
end
42-
end
4317
end
4418

4519
spec.tests.each do |test|

0 commit comments

Comments
 (0)