Commit Graph

58 Commits

Author SHA1 Message Date
Shane Harvey
b6cc22ffdd
PYTHON-5748 Remove unused SpecRunner class (#2725) 2026-03-09 12:37:32 -07:00
Steven Silvester
27ac7bd717
PYTHON-2517 Remove any Jython specific code or workarounds (#2641) 2025-12-12 12:36:11 -06:00
Steven Silvester
ffb372aec7
PYTHON-5027 Test Windows with Python 3.14t (#2444) 2025-07-24 13:20:19 -05:00
Noah Stapp
e2bfa9a590
PYTHON-5248 - Drop support for MongoDB 4.0 (#2353) 2025-06-20 14:25:19 -04:00
Steven Silvester
1bcb85f1c1
PYTHON-5321 Remove Serverless testing (#2359) 2025-06-09 19:46:10 -05:00
Noah Stapp
34ca759f85
PYTHON-5113 - Refactor test utils for async (#2149) 2025-03-12 12:59:56 -04:00
Shane Harvey
7ef18af49b
PYTHON-4580 Add key_expiration_ms option for DEK cache lifetime (#2186) 2025-03-10 17:11:38 -07:00
Shane Harvey
2b667df14f
PYTHON-5120 Reduce configureFailPoint duplication in tests (#2131) 2025-02-26 11:16:44 -08:00
Noah Stapp
7a4150ac17
PYTHON-5080 - Convert test.test_examples to async (#2097) 2025-02-05 08:48:54 -05:00
Noah Stapp
b47143cd10
PYTHON-4864 - Create async version of SpecRunnerThread (#2094) 2025-02-04 07:42:13 -05:00
Noah Stapp
0e8d70457f
Async client uses tasks instead of threads
PYTHON-4725 - Async client should use tasks for SDAM instead of threads
PYTHON-4860 - Async client should use asyncio.Lock and asyncio.Condition
PYTHON-4941 - Synchronous unified test runner being used in asynchronous tests
PYTHON-4843 - Async test suite should use a single event loop
PYTHON-4945 - Fix test cleanups for mongoses

Co-authored-by: Iris <58442094+sleepyStick@users.noreply.github.com>
2024-11-26 16:55:27 -05:00
Shane Harvey
b5f0104048
PYTHON-4980 Ignore network error on killAllSessions (#2011) 2024-11-19 15:43:28 -08:00
Noah Stapp
3a662291e0
PYTHON-4700 - Convert CSFLE tests to async (#1907) 2024-10-11 10:48:24 -04:00
Noah Stapp
739510214b
PYTHON-4731 - Explicitly close all MongoClients opened during tests (#1855) 2024-09-17 09:22:17 -04:00
Noah Stapp
1b3dea3f03
PYTHON-4533 - Convert test/test_transactions.py to async (#1732) 2024-07-15 16:45:59 -07:00
Noah Stapp
ffa6555485
PYTHON-4476 Separate data and IO classes more effectively (#1678) 2024-06-26 10:12:39 -07:00
Noah Stapp
d6bf0e1e78
PYTHON-4264 Async PyMongo Beta (#1629) 2024-06-06 09:01:24 -07:00
Steven Silvester
992d1507e7
PYTHON-4005 Replace flake8 and isort with ruff (#1399) 2023-10-19 11:56:22 -05:00
Shane Harvey
1ad0df0858
PYTHON-3724 Remove null values from command_started_event in fle2v2-CreateCollection.yml (#1223) 2023-06-06 12:06:08 -07:00
Shane Harvey
0092b0af79
PYTHON-2504 Run pyupgrade 3.4.0 and ruff 0.0.265 (#1196)
pyupgrade --py37-plus bson/*.py pymongo/*.py gridfs/*.py test/*.py tools/*.py test/*/*.py
ruff --fix-only --select ALL --fixable ALL --target-version py37 --line-length=100 --unfixable COM812,D400,D415,ERA001,RUF100,SIM108,D211,D212,SIM105,SIM,PT,ANN204,EM bson/*.py pymongo/*.py gridfs/*.py test/*.py test/*/*.py
2023-05-11 15:27:17 -07:00
Shane Harvey
deb0566c3e
PYTHON-3614 Support Queryable Encryption protocol v2 on 7.0+ (#1197)
Resync FLE spec tests and update docs for new QE protocol on 7.0.
Add client side error for createEncryptedCollection on MongoDB < 7.0.
KMS timeout errors should always have exc.timeout==True.
PYTHON-3583 Drivers should not create the ECC collection in v2 of queryable encryption.
2023-05-01 09:16:28 -07:00
Shane Harvey
c0dd24e4a7
PYTHON-3609 Stop using deprecated setDaemon api in test suite (#1158) 2023-02-16 15:49:00 -08:00
Shane Harvey
79aa5e6757
PYTHON-3516 Improve test EventListener api (#1114) 2022-11-14 08:50:08 -08:00
Julius Park
484374eb3f
PYTHON-3298 Add flag to create_collection to skip listCollections pre-check (#1006) 2022-07-18 13:40:16 -07:00
Julius Park
6b088ffa4e
PYTHON-3241 Add Queryable Encryption API to AutoEncryptionOpts (#957) 2022-06-06 12:33:31 -04:00
Shane Harvey
ede07f44dd
PYTHON-3250 Speed up majority writes in test suite (#936) 2022-05-03 14:41:24 -07:00
Steven Silvester
5578999a90
PYTHON-1834 Use a code formatter (#852) 2022-02-09 06:44:28 -06:00
Steven Silvester
f4cef37328
PYTHON-3064 Add typings to test package (#844) 2022-02-07 19:33:41 -06:00
Shane Harvey
e27131546c
PYTHON-2998 Remove md5 checksums from gridfs and remove disable_md5 (#776)
Speed up gridfs tests (shaves off about 2 minutes on macOS).
2021-11-04 17:25:11 -07:00
Shane Harvey
968ee7ba96
PYTHON-2868 Test Serverless behind a load balancer (#742) 2021-09-23 15:57:57 -07:00
Shane Harvey
d559b28efb
PYTHON-2905 Fix CSFLE after UUID decoding changes (#732) 2021-09-16 17:50:22 -07:00
Shane Harvey
65aa7c86d5
PYTHON-2850 Remove map_reduce/inline_map_reduce (#703) 2021-08-12 09:44:52 -07:00
Shane Harvey
e1b068d37a
PYTHON-2525 Remove Collection.count and Cursor.count (#700) 2021-08-10 13:52:29 -07:00
Shane Harvey
b4b7a07b81
PYTHON-2762 Avoid duplicating unified test files for LB testing (#649)
Create new client for each cursor/session __del__ test.
Always close cursors in spec tests.
2021-06-25 16:20:21 -07:00
Shane Harvey
93ac5e0277
PYTHON-2676 Add load balancer tests in EVG (#625)
Add load balancer spec tests
Ensure LB supports retryable reads/writes
Add assertNumberConnectionsCheckedOut, createFindCursor, ignoreResultAndError
Add PoolClearedEvent.service_id and fix isClientError unified test assertion
2021-05-27 15:05:26 -07:00
Bernie Hackett
a72e8b8823 PYTHON-2133 Remove py2 support from test
Also delete bson/py3compat.py
2021-01-20 09:40:36 -08:00
Prashant Mital
6b0123594a
PYTHON-2033 Unified Test Format (#519) 2020-12-21 19:22:29 -08:00
Prashant Mital
c673d8b3ce
PYTHON-2318 Atlas Data Lake testing (#500) 2020-12-17 13:58:03 -08:00
Shane Harvey
d1fd3f7e98
PYTHON-2363 Rate limit new connection creations via maxConnecting (#511)
At most 2 connections can be in the pending state per connection pool.
The pending state covers all the work required to setup a new connection
including TCP, TLS, and MongoDB authentication. For example, if two
threads are currently creating connections, a third thread will wait for
either an existing connection to be checked back into the pool or for
one of the two threads to finish creating a connection.

The change reduces the likelihood of connection storms and improves the
driver's ability to reuse existing connections.
2020-11-23 15:55:54 -08:00
Shane Harvey
1f4123e4bf PYTHON-2123 Streaming heartbeat protocol
MongoClient now requires 2 connections and 2 threads to each MongoDB 4.4+ server.
With one connection, the server streams (or pushes) updated heartbeat info.
With the other connection, the client periodically pings the server to
establish an accurate round-trip time (RTT). This change optimizes the
discovery of server state changes such as replica set elections.

Additional changes:
- Mark server Unknown before retrying isMaster check.
- Always reset the pool _after_ marking the server unknown.
- Configure fail point before creating the client in test SpecRunner.
- Unfreeze with replSetFreeze:0 to ensure a speedy elections in test suite.
2020-07-01 14:49:46 -07:00
Shane Harvey
fb7533e888 PYTHON-2099 Make ExceededTimeLimit a retryable writes error
Reinstate DuplicateKey code assertions.
2020-05-12 14:41:11 -07:00
Shane Harvey
9f8468f309 PYTHON-2037 Test operations omit default write concern 2020-05-08 17:48:07 -07:00
Shane Harvey
5d8e814e58 PYTHON-2237 Use sort when verifying contents of outcome collections 2020-05-08 14:24:20 -07:00
Shane Harvey
fd64f4dd64 PYTHON-2030 Support collection and index creation in multi-doc transactions 2020-04-02 12:20:50 -07:00
Prashant Mital
b65fdf3f51
PYTHON-2142 Add index hinting support to delete operations 2020-03-26 16:01:33 -07:00
Prashant Mital
1323ef15cb
PYTHON-2036 Expand CRUD API support for index hinting (also PYTHON-2015, PYTHON-2104, PYTHON-2134) 2020-02-25 19:22:25 -08:00
Prashant Mital
ed4204f237
PYTHON-1954 Stop holding the topology lock while creating new connections 2019-12-05 09:58:58 +05:30
Shane Harvey
6f00a240c7 PYTHON-1955 Test encryption in evergreen
Only enable xtrace output for non-sensitive tasks.
2019-08-13 09:07:42 -07:00
Prashant Mital
78aa667f0f
PYTHON-1934 retryWrites=True with MMAPv1 storage engine should raise an actionable error 2019-08-08 13:24:46 -07:00
Shane Harvey
e6eecb06d1 PYTHON-1884 Implement auto encryption spec tests
Skip test for symbol type which pymongo converts to string.
Fix {} comparison with RawBSONDocument in command events.
Add support for $$type assertions.
Nicer message in check_events.
Support errorContains with empty string.
Move custom data files to custom/.
2019-08-06 16:17:39 -07:00