Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-3033

Logging tests should allow durationMS to be a float

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Unknown Unknown
    • None
    • Component/s: Logging
    • $i18n.getText("admin.common.words.hide")
      Key Status/Resolution FixVersion
      PYTHON-4925 Fixed 4.11
      $i18n.getText("admin.common.words.show")
      #scriptField, #scriptField *{ border: 1px solid black; } #scriptField{ border-collapse: collapse; } #scriptField td { text-align: center; /* Center-align text in table cells */ } #scriptField td.key { text-align: left; /* Left-align text in the Key column */ } #scriptField a { text-decoration: none; /* Remove underlines from links */ border: none; /* Remove border from links */ } /* Add green background color to cells with FixVersion */ #scriptField td.hasFixVersion { background-color: #00FF00; /* Green color code */ } /* Center-align the first row headers */ #scriptField th { text-align: center; } Key Status/Resolution FixVersion PYTHON-4925 Fixed 4.11

      In Python we log "durationMS" as a float to avoid truncating the value:

      2024-11-04 14:04:46,886 DEBUG logger {"topologyId": {"$oid": "672944fe6efb88205cc4b5c3"}, "driverConnectionId": 1, "serverConnectionId": 777, "serverHost": "localhost", "serverPort": 27017, "awaited": false, "durationMS": 1.9565420225262642, "reply": "{\"helloOk\": true, \"ismaster\": true, \"topologyVersion\": {\"processId\": {\"$oid\": \"67240e9bb9de113c205b2beb\"}}, \"maxBsonObjectSize\": 16777216, \"maxMessageSizeBytes\": 48000000, \"maxWriteBatchSize\": 100000, \"localTime\": {\"$date\": \"2024-11-04T22:04:46.886Z\"}, \"logicalSessionTimeoutMinutes\": 30, \"connectionId\": 777, \"maxWireVersion\": 25, \"ok\": 1.0}", "message": "Server heartbeat succeeded"}
      

      However, the SDAM logging tests require "durationMS" to be an integer:

                    durationMS: { $$type: [int, long] }
      

      https://github.com/mongodb/specifications/blob/9f6848712ee5b66bca8562c8903ecd6a546bcd63/source/server-discovery-and-monitoring/tests/unified/logging-standalone.yml#L172

      The Command logging and CMAP logging tests already allow "durationMS" to be a double so there is prior art here:

                    durationMS: { $$type: [double, int, long] }
      

      Uncovered by DRIVERS-2573 (and PYTHON-4925).

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: