Skip to content

Commit 1807a60

Browse files
committed
Test positive max_time_ms option
1 parent 76116af commit 1807a60

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

spec/mongo/collection/view/readable_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,10 @@
245245
view.count(max_time_ms: 0.1)
246246
}.to raise_error(Mongo::Error::OperationFailure)
247247
end
248+
249+
it 'sets the max_time_ms option on the command', if: write_command_enabled? do
250+
expect(view.count(max_time_ms: 100)).to eq(10)
251+
end
248252
end
249253

250254
describe '#distinct' do

0 commit comments

Comments
 (0)