Skip to content
8 changes: 4 additions & 4 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -729,10 +729,10 @@ buildvariants:
ruby: "jruby-9.2"
mongodb-version: "4.2"
topology: "*"
os: rhel70
os: ubuntu1604
display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}"
tasks:
- name: "test"
- name: "test-mlaunch"

-
matrix_name: "jruby-noauth"
Expand All @@ -741,10 +741,10 @@ buildvariants:
ruby: "jruby-9.2"
mongodb-version: "2.6"
topology: "*"
os: rhel70
os: ubuntu1604
display_name: "${mongodb-version} ${topology} ${auth-and-ssl} ${ruby}"
tasks:
- name: "test"
- name: "test-mlaunch"

-
matrix_name: "zlib-auth"
Expand Down
11 changes: 10 additions & 1 deletion lib/mongo/socket.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,16 @@ class Socket
def alive?
sock_arr = [ @socket ]
if Kernel::select(sock_arr, nil, sock_arr, 0)
eof?
# The eof? call is supposed to return immediately since select
# indicated the socket is readable. However, if @socket is an SSL
# socket, eof? can block anyway - see RUBY-2140.
begin
Timeout.timeout(0.1) do
eof?
end
rescue ::Timeout::Error
true
end
else
true
end
Expand Down
4 changes: 2 additions & 2 deletions spec/integration/retryable_errors_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
end

after do
ClusterTools.instance.direct_client_for_each_server do |client|
ClusterTools.instance.direct_client_for_each_data_bearing_server do |client|
client.use(:admin).database.command(clear_fail_point_command)
end
end
Expand Down Expand Up @@ -62,7 +62,7 @@
server.monitor.stop!
end

ClusterTools.instance.direct_client_for_each_server do |client|
ClusterTools.instance.direct_client_for_each_data_bearing_server do |client|
client.use(:admin).database.command(fail_point_command)
end
end
Expand Down
2 changes: 2 additions & 0 deletions spec/mongo/auth/scram/conversation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
end

describe '#start' do
# Test uses global assertions
clean_slate

let(:query) do
conversation.start(nil)
Expand Down
4 changes: 2 additions & 2 deletions spec/mongo/collection_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,9 @@
require_topology :replica_set

let(:client_options) do
{
SpecConfig.instance.auth_options.merge(
read: { mode: :primary_preferred },
}
)
end

let(:subscriber) { EventSubscriber.new }
Expand Down
Loading