PYTHON-5342 Fix test_dns_failures test (#2336)

This commit is contained in:
Steven Silvester 2025-05-08 13:10:11 -05:00 committed by GitHub
parent d0b0dc3512
commit 5914ea0ff4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 4 deletions

View File

@ -20,7 +20,6 @@ import sys
import time
from test.utils_shared import FunctionCallRecorder
from typing import Any
from unittest import skipIf
sys.path[0:0] = [""]
@ -92,7 +91,6 @@ class SrvPollingKnobs:
self.disable()
@skipIf(not _IS_SYNC and sys.platform == "win32", "PYTHON-5342 known issue on Windows")
class TestSrvPolling(AsyncPyMongoTestCase):
BASE_SRV_RESPONSE = [
("localhost.test.build.10gen.cc", 27017),
@ -186,6 +184,9 @@ class TestSrvPolling(AsyncPyMongoTestCase):
):
await assertion_method(expected_response, client)
# Close the client early to avoid affecting the next scenario run.
await client.close()
async def test_addition(self):
response = self.BASE_SRV_RESPONSE[:]
response.append(("localhost.test.build.10gen.cc", 27019))

View File

@ -20,7 +20,6 @@ import sys
import time
from test.utils_shared import FunctionCallRecorder
from typing import Any
from unittest import skipIf
sys.path[0:0] = [""]
@ -92,7 +91,6 @@ class SrvPollingKnobs:
self.disable()
@skipIf(not _IS_SYNC and sys.platform == "win32", "PYTHON-5342 known issue on Windows")
class TestSrvPolling(PyMongoTestCase):
BASE_SRV_RESPONSE = [
("localhost.test.build.10gen.cc", 27017),
@ -186,6 +184,9 @@ class TestSrvPolling(PyMongoTestCase):
):
assertion_method(expected_response, client)
# Close the client early to avoid affecting the next scenario run.
client.close()
def test_addition(self):
response = self.BASE_SRV_RESPONSE[:]
response.append(("localhost.test.build.10gen.cc", 27019))