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

Topology event name does not match type emitted

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 4.0.0
    • Affects Version/s: 4.0.0
    • Component/s: None
    • Not Needed

      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.

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

              Created:
              Updated:
              Resolved: