Skip to content

PYTHON-4021 Fix previous topologyDescription published when closing a client #1769

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 2, 2024

Conversation

ShaneHarvey
Copy link
Member

Small fix for PYTHON-4021 which resolves this test failure:

self = <test.test_discovery_and_monitoring.TestUnifiedReplicasetEmitTopologyChangedBeforeClose testMethod=test_Topology_lifecycle>

    def test_case(self):
>       self.run_scenario(spec)

test/unified_format.py:1953: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/unified_format.py:1897: in run_scenario
    self._run_scenario(spec, uri)
test/unified_format.py:1936: in _run_scenario
    self.check_events(expect_events)
test/unified_format.py:1801: in check_events
    self.match_evaluator.match_event(expected_event, actual_events[idx])
test/unified_format.py:940: in match_event
    self.match_event_fields(actual, spec)
test/unified_format.py:881: in match_event_fields
    self.match_topology_description(
test/unified_format.py:846: in match_topology_description
    self.test.assertEqual(getattr(actual, field), expected)
E   AssertionError: 'ReplicaSetNoPrimary' != 'ReplicaSetWithPrimary'
E   - ReplicaSetNoPrimary
E   ?           ^^
E   + ReplicaSetWithPrimary
E   ?           ^^^^

@ShaneHarvey ShaneHarvey merged commit d28ceb2 into mongodb:master Aug 2, 2024
25 of 26 checks passed
@ShaneHarvey ShaneHarvey deleted the PYTHON-4021 branch August 3, 2024 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants