-
Type: Bug
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: 4.0.0
-
Component/s: None
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.