Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-3272

Topology event name does not match type emitted

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Unknown
    • Resolution: Fixed
    • Affects Version/s: 4.0.0
    • Fix Version/s: 4.0.0
    • Component/s: None
    • Labels:
      None
    • Documentation Changes:
      Not Needed

      Description

      When receiving an SRVPolling update the Topology emits a server description changed event but the event object is a TopologyDescriptionChangedEvent. 
      Also when closing the this.s.detectTopologyDescriptionChange listener is removed from listening to server description changes, which is not the event it is subscribed to.

      This ticket was created from the work done in NODE-3132. A fix was attempted during the work there but proved difficult to isolate from other tests.

      A suggestion to the implementer: we should define this.s.handleSrvPolling and this.s.detectTopologyDescriptionChange to always be defined and only optionally used as listeners instead of currently where they become defined on the class if a topology change event is emitted. It makes testing a little more straight forward.

        Attachments

          Activity

            People

            Assignee:
            neal.beeken Neal Beeken
            Reporter:
            neal.beeken Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: