-
Type:
Build Failure
-
Resolution: Fixed
-
Priority:
Unknown
-
Affects Version/s: None
-
Component/s: greenerbuild
-
None
-
Python Drivers
-
Not Needed
test_continuous_network_errors is failing more often starting today, for example:
- https://spruce.mongodb.com/task/mongo_python_driver_test_rhel8_python3.12_test_8.0_replica_set_noauth_ssl_sync_async_patch_080c1c61212594e4de4792cf055b904a570c4359_67c227d5d6931d00075a1ae1_25_02_28_21_17_11?execution=0&sortBy=STATUS&sortDir=ASC
- https://spruce.mongodb.com/task/mongo_python_driver_test_rhel8_python3.9_cov_no_c_test_8.0_replica_set_noauth_ssl_sync_async_patch_080c1c61212594e4de4792cf055b904a570c4359_67c227d5d6931d00075a1ae1_25_02_28_21_17_11?execution=0&sortBy=STATUS&sortDir=ASC
[2025/02/28 13:34:37.039] __________________ TestClient.test_continuous_network_errors ___________________ [2025/02/28 13:34:37.039] self = <test.test_client.TestClient testMethod=test_continuous_network_errors> [2025/02/28 13:34:37.039] @unittest.skipIf("PyPy" in sys.version, "PYTHON-2927 fails often on PyPy") [2025/02/28 13:34:37.039] def test_continuous_network_errors(self): [2025/02/28 13:34:37.039] def server_description_count(): [2025/02/28 13:34:37.039] i = 0 [2025/02/28 13:34:37.039] for obj in gc.get_objects(): [2025/02/28 13:34:37.039] try: [2025/02/28 13:34:37.039] if isinstance(obj, ServerDescription): [2025/02/28 13:34:37.039] i += 1 [2025/02/28 13:34:37.039] except ReferenceError: [2025/02/28 13:34:37.039] pass [2025/02/28 13:34:37.039] return i [2025/02/28 13:34:37.039] gc.collect() [2025/02/28 13:34:37.039] with client_knobs(min_heartbeat_interval=0.003): [2025/02/28 13:34:37.039] client = self.simple_client( [2025/02/28 13:34:37.039] "invalid:27017", heartbeatFrequencyMS=3, serverSelectionTimeoutMS=150 [2025/02/28 13:34:37.039] ) [2025/02/28 13:34:37.039] initial_count = server_description_count() [2025/02/28 13:34:37.039] with self.assertRaises(ServerSelectionTimeoutError): [2025/02/28 13:34:37.039] client.test.test.find_one() [2025/02/28 13:34:37.039] gc.collect() [2025/02/28 13:34:37.039] final_count = server_description_count() [2025/02/28 13:34:37.039] # If a bug like PYTHON-2433 is reintroduced then too many [2025/02/28 13:34:37.039] # ServerDescriptions will be kept alive and this test will fail: [2025/02/28 13:34:37.039] # AssertionError: 19 != 46 within 15 delta (27 difference) [2025/02/28 13:34:37.039] # On Python 3.11 we seem to get more of a delta. [2025/02/28 13:34:37.039] > self.assertAlmostEqual(initial_count, final_count, delta=20) [2025/02/28 13:34:37.039] E AssertionError: 46 != 24 within 20 delta (22 difference) [2025/02/28 13:34:37.039] test/test_client.py:1820: AssertionError