spec/integration/sdam_prose_spec.rb in mongo-2.18.3 vs spec/integration/sdam_prose_spec.rb in mongo-2.19.0

- old
+ new

@@ -1,7 +1,7 @@ # frozen_string_literal: true -# encoding: utf-8 +# rubocop:todo all require 'spec_helper' describe 'SDAM prose tests' do # The "streaming protocol tests" are covered by the tests in @@ -45,15 +45,15 @@ blockTimeMS: 500, appName: "streamingRttTest", }, ) - deadline = Time.now + 10 + deadline = Mongo::Utils.monotonic_time + 10 loop do if server.average_round_trip_time > 0.25 break end - if Time.now >= deadline + if Mongo::Utils.monotonic_time >= deadline raise "Failed to witness RTT growing to >= 250 ms in 10 seconds" end sleep 0.2 end end