Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-4806

[Build Failure] test.mockupdb.test_handshake.TestHandshake

    • Type: Icon: Build Failure Build Failure
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 4.10.1
    • Affects Version/s: None
    • Component/s: None
    • None
    • Python Drivers
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Name of Failure:

      test.mockupdb.test_handshake.TestHandshake.*

      Link to task:

      https://spruce.mongodb.com/task/mongo_python_driver_mockupdb_tests__platform~rhel8_python_version~3.8_mockupdb_4713afa910f12d013571778a12fda2287d0bf19d_24_10_01_02_14_15/tests?execution=3&sortBy=STATUS&sortDir=ASC

      Context of when and why the failure occurred:

      Caused by PYTHON-1714

      Stack trace:

       [2024/10/01 09:50:06.436] FAILURE: AssertionError: assert OrderedDict([...', '4.10.0')]) == {'name': 'PyM...on': '4.10.0'}
       [2024/10/01 09:50:06.436]   
       [2024/10/01 09:50:06.436]   Omitting 1 identical items, use -vv to show
       [2024/10/01 09:50:06.436]   Differing items:
       [2024/10/01 09:50:06.436]   {'name': 'PyMongo|c'} != {'name': 'PyMongo'}
       [2024/10/01 09:50:06.436]   
       [2024/10/01 09:50:06.436]   Full diff:
       [2024/10/01 09:50:06.436]   - {
       [2024/10/01 09:50:06.436]   + OrderedDict({
       [2024/10/01 09:50:06.436]   -     'name': 'PyMongo',
       [2024/10/01 09:50:06.436]   +     'name': 'PyMongo|c',
       [2024/10/01 09:50:06.436]   ?                     ++
       [2024/10/01 09:50:06.436]         'version': '4.10.0',
       [2024/10/01 09:50:06.436]   - }
       [2024/10/01 09:50:06.436]   + }) ()
       [2024/10/01 09:50:06.436] self = <test_handshake.TestHandshake testMethod=test_client_handshake_data>
       [2024/10/01 09:50:06.436]     def test_client_handshake_data(self):
       [2024/10/01 09:50:06.436]         primary, secondary = MockupDB(), MockupDB()
       [2024/10/01 09:50:06.436]         for server in primary, secondary:
       [2024/10/01 09:50:06.436]             server.run()
       [2024/10/01 09:50:06.436]             self.addCleanup(server.stop)
       [2024/10/01 09:50:06.436]     
       [2024/10/01 09:50:06.436]         hosts = [server.address_string for server in (primary, secondary)]
       [2024/10/01 09:50:06.436]         primary_response = OpReply(
       [2024/10/01 09:50:06.436]             "ismaster", True, setName="rs", hosts=hosts, minWireVersion=2, maxWireVersion=6
       [2024/10/01 09:50:06.436]         )
       [2024/10/01 09:50:06.436]         error_response = OpReply(0, errmsg="Cache Reader No keys found for HMAC ...", code=211)
       [2024/10/01 09:50:06.436]     
       [2024/10/01 09:50:06.436]         secondary_response = OpReply(
       [2024/10/01 09:50:06.436]             "ismaster",
       [2024/10/01 09:50:06.436]             False,
       [2024/10/01 09:50:06.436]             setName="rs",
       [2024/10/01 09:50:06.436]             hosts=hosts,
       [2024/10/01 09:50:06.436]             secondary=True,
       [2024/10/01 09:50:06.436]             minWireVersion=2,
       [2024/10/01 09:50:06.436]             maxWireVersion=6,
       [2024/10/01 09:50:06.436]         )
       [2024/10/01 09:50:06.436]     
       [2024/10/01 09:50:06.436]         client = MongoClient(
       [2024/10/01 09:50:06.436]             primary.uri, replicaSet="rs", appname="my app", heartbeatFrequencyMS=500
       [2024/10/01 09:50:06.436]         )  # Speed up the test.
       [2024/10/01 09:50:06.436]     
       [2024/10/01 09:50:06.436]         self.addCleanup(client.close)
       [2024/10/01 09:50:06.436]     
       [2024/10/01 09:50:06.436]         # New monitoring connections send data during handshake.
       [2024/10/01 09:50:06.436]         heartbeat = primary.receives("ismaster")
       [2024/10/01 09:50:06.436] >       _check_handshake_data(heartbeat)
       [2024/10/01 09:50:06.436] test/mockupdb/test_handshake.py:122: 
       [2024/10/01 09:50:06.436] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
       [2024/10/01 09:50:06.436] request = Command({"ismaster": 1, "helloOk": true, "client": {"driver": {"name": "PyMongo|c", "version": "4.10.0"}, "os": {"type...-477.27.1.el8_8.x86_64"}, "platform": "CPython 3.8.10.final.0", "application": {"name": "my app"}}}, namespace="admin")
       [2024/10/01 09:50:06.436]     def _check_handshake_data(request):
       [2024/10/01 09:50:06.436]         assert "client" in request
       [2024/10/01 09:50:06.436]         data = request["client"]
       [2024/10/01 09:50:06.436]     
       [2024/10/01 09:50:06.436]         assert data["application"] == {"name": "my app"}
       [2024/10/01 09:50:06.436] >       assert data["driver"] == {"name": "PyMongo", "version": pymongo_version}
       [2024/10/01 09:50:06.436] E       AssertionError: assert OrderedDict([...', '4.10.0')]) == {'name': 'PyM...on': '4.10.0'}
       [2024/10/01 09:50:06.436] E         
       [2024/10/01 09:50:06.436] E         Omitting 1 identical items, use -vv to show
       [2024/10/01 09:50:06.436] E         Differing items:
       [2024/10/01 09:50:06.436] E         {'name': 'PyMongo|c'} != {'name': 'PyMongo'}
       [2024/10/01 09:50:06.436] E         
       [2024/10/01 09:50:06.436] E         Full diff:
       [2024/10/01 09:50:06.436] E         - {
       [2024/10/01 09:50:06.436] E         + OrderedDict({
       [2024/10/01 09:50:06.436] E         -     'name': 'PyMongo',
       [2024/10/01 09:50:06.436] E         +     'name': 'PyMongo|c',
       [2024/10/01 09:50:06.436] E         ?                     ++
       [2024/10/01 09:50:06.436] E               'version': '4.10.0',
       [2024/10/01 09:50:06.436] E         - }
       [2024/10/01 09:50:06.436] E         + })
       [2024/10/01 09:50:06.436] test/mockupdb/test_handshake.py:42: AssertionError
      

            Assignee:
            steve.silvester@mongodb.com Steve Silvester
            Reporter:
            steve.silvester@mongodb.com Steve Silvester
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: