Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-50460

Use a mockable time source for shard_connection_tests.cpp

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.4.0
    • Component/s: Sharding
    • None
    • Cluster Scalability
    • ALL
    • 0

      checkNewConns utility function in shard_connection_test.cpp is creating new connections and tries to differentiate them from older ones using the creation timestamp. On certain hardware the clock resolution is not high enough and the new connections end up getting the same time, which makes the test unreliable.

      An attempt to fix this was already done by kaloian.manassiev (SERVER-34857) back in 2018 for version 4.0.

      Moreover this test was recently removed in master (SERVER-47426)

      Either we find out that this test is obsolete and can be now removed also from 4.4 or we will need to fix it in a proper way using a mockable time source to explicitly advance the time between different connection creations.

            Assignee:
            backlog-server-cluster-scalability [DO NOT USE] Backlog - Cluster Scalability
            Reporter:
            tommaso.tocci@mongodb.com Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: