Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ group :development, :testing do
end
end

group :testing do
gem 'rspec-retry'
end

group :development do
gem 'ruby-prof', :platforms => :mri
gem 'pry-rescue'
Expand Down
4 changes: 2 additions & 2 deletions spec/mongo/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1604,8 +1604,8 @@
expect(session).to be_a(Mongo::Session)
end

it 'sets the last use field to the current time' do
expect(session.instance_variable_get(:@server_session).last_use).to be_within(2).of(Time.now)
it 'sets the last use field to the current time', retry: 4 do
expect(session.instance_variable_get(:@server_session).last_use).to be_within(1).of(Time.now)
end

context 'when options are provided' do
Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
require 'support/authorization'
require 'support/primary_socket'
require 'support/constraints'
require 'rspec/retry'

RSpec.configure do |config|
config.include(Authorization)
Expand Down