Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-1687

Cluster hangs waiting for first round of sdam when time is frozen

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Critical - P2 Critical - P2
    • 2.7.0
    • Affects Version/s: 2.7.0.rc0
    • Component/s: Server Selection
    • None

      Tests hang when stubbing out Time.now on 2.7.0.rc0

      Hi, I tried upgrading from 2.6.2 to 2.7.0.rc0 but my rspec tests hang if I have this in my test:

      let!(:now) {Time.now}
      
      before :each do
        allow(Time).to receive(:now).and_return(now)
      end
      

      If I uncomment out the `allow` statement, the tests run. I have not yet been able to determine where it hangs. Here's the log output when I run the tests

      D, [2019-01-28T13:44:01.446433 #2585] DEBUG -- : MONGODB | 127.0.0.1:27017 | appboy_dotcom_test.listCollections | STARTED | {"listCollections"=>1, "cursor"=>{}, "nameOnly"=>true, "filter"=>{"name"=>{"$not"=>/system\.|\$/}}, "lsid"=>{"id"=><BSON::Binary:0x70123045520400 type=uuid data=0x1345574249f04843...>}}
      D, [2019-01-28T13:44:01.446433 #2585] DEBUG -- : MONGODB | 127.0.0.1:27017 | appboy_dotcom_test.listCollections | SUCCEEDED | 0.000s
      D, [2019-01-28T13:44:01.446433 #2585] DEBUG -- : MONGODB | EVENT: #<TopologyOpening topology=Unknown[]>
      D, [2019-01-28T13:44:01.446433 #2585] DEBUG -- : MONGODB | Topology type 'unknown' initializing.
      D, [2019-01-28T13:44:01.446433 #2585] DEBUG -- : MONGODB | EVENT: #<TopologyChanged prev=Unknown[] new=Unknown[127.0.0.1:27017]>
      D, [2019-01-28T13:44:01.446433 #2585] DEBUG -- : MONGODB | Topology type 'Unknown' changed to type 'Unknown'.
      D, [2019-01-28T13:44:01.446433 #2585] DEBUG -- : MONGODB | EVENT: #<ServerOpening address=127.0.0.1:27017 topology=Unknown[127.0.0.1:27017]>
      D, [2019-01-28T13:44:01.446433 #2585] DEBUG -- : MONGODB | Server 127.0.0.1:27017 initializing.
      D, [2019-01-28T13:44:01.446433 #2585] DEBUG -- : MONGODB | EVENT: #<ServerDescriptionChanged address=127.0.0.1:27017 topology=Single[127.0.0.1:27017] prev=#<Mongo::Server:Description:0x70123104461980 config={} average_round_trip_time=> new=#<Mongo::Server:Description:0x70122845450300 config={"ismaster"=>true, "maxBsonObjectSize"=>16777216, "maxMessageSizeBytes"=>48000000, "maxWriteBatchSize"=>100000, "localTime"=>2019-01-28 13:44:01 UTC, "logicalSessionTimeoutMinutes"=>30, "minWireVersion"=>0, "maxWireVersion"=>6, "readOnly"=>false, "ok"=>1.0} average_round_trip_time=0.0>>
      D, [2019-01-28T13:44:01.446433 #2585] DEBUG -- : MONGODB | Server description for 127.0.0.1:27017 changed from 'unknown' to 'standalone'.
      D, [2019-01-28T13:44:01.446433 #2585] DEBUG -- : MONGODB | EVENT: #<TopologyChanged prev=Unknown[127.0.0.1:27017] new=Single[127.0.0.1:27017]>
      D, [2019-01-28T13:44:01.446433 #2585] DEBUG -- : MONGODB | Topology type 'Unknown' changed to type 'Single'.
      
      THEN IT HANGS HERE, NO LOGS AFTER THIS POINT
      

            Assignee:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            jonhyman Jon Hyman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: