Commit Graph

44 Commits

Author SHA1 Message Date
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
1dd42173e1
PYTHON-4919 Resync tests for retryable writes (#2006) 2024-11-18 10:26:22 -08:00
Iris
8791aa00ea
PYTHON-4790 Migrate test_retryable_writes.py to async (#1876) 2024-10-01 08:39:57 -07:00
Noah Stapp
739510214b
PYTHON-4731 - Explicitly close all MongoClients opened during tests (#1855) 2024-09-17 09:22:17 -04:00
Shane Harvey
6bdaf19c78
PYTHON-4617 Skip unified retryable writes tests on MMAPv1 (#1841) 2024-09-06 10:46:10 -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
Noah Stapp
62c6d0f330
PYTHON-3587 Do not perform server selection to determine sessions support (#1491) 2024-02-05 13:19:26 -08:00
Noah Stapp
5dc60342ed
PYTHON-2834 Direct read/write retries to another mongos if possible (#1421) 2023-11-14 12:49:42 -08:00
Steven Silvester
992d1507e7
PYTHON-4005 Replace flake8 and isort with ruff (#1399) 2023-10-19 11:56:22 -05:00
Noah Stapp
b16e06acfd
PYTHON-3727 Use tox for unit tests and switch to pytest (#1249) 2023-06-21 15:07:14 -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
dcbba962dd
PYTHON-3596 Guarantee a document update in retryable writes tests (#1149) 2023-02-07 07:35:19 -08:00
Julius Park
26efc0f43d
PYTHON-3388 Propagate Original Error for Write Errors Labeled NoWritesPerformed (#1117) 2022-12-01 17:54:15 -08:00
Shane Harvey
79aa5e6757
PYTHON-3516 Improve test EventListener api (#1114) 2022-11-14 08:50:08 -08:00
Shane Harvey
1575e53ef7
PYTHON-3409 Retry flakey CSOT tests twice (#1046) 2022-08-22 16:19:30 -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
2af521ec03
PYTHON-2984 Fix retry behavior for bulk write writeConcernError (#800) 2021-11-19 12:15:23 -08:00
Shane Harvey
df6f6496a4
PYTHON-2927 PYTHON-2937 Skip failing tests on PyPy (#753)
Cleanup test clients more eagerly.
2021-10-13 10:29:38 -07:00
Shane Harvey
11752ed594
PYTHON-2899 Remove code for MongoDB <= 3.4 (#729)
Remove unneeded memoryview to bytes conversion.
2021-09-16 16:53:50 -07:00
Shane Harvey
6a18027db8
PYTHON-2534 Avoid race in test_pool_paused_error_is_retryable (#704) 2021-08-16 10:27:37 -07:00
Shane Harvey
f541e7731c
PYTHON-2602 Test that pool paused errors are retryable (#681)
Allow client_knobs to be used as a decorator.
2021-07-30 17:56:01 -07:00
Prashant Mital
f07da34f97
PYTHON-2545 Test Atlas Serverless (#664) 2021-07-27 16:35:09 -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
e01d9a37e7
PYTHON-1320 Remove legacy CRUD methods (#556)
Remove save, insert, update, remove, and find_and_modify.
Remove tools/benchmark.py
2021-01-22 17:11:15 -08:00
Prashant Mital
f458473925
PYTHON-2452 Ensure command-responses with RetryableWriteError label are retried on MongoDB 4.4+ (#530) 2020-12-14 19:03:19 -08:00
Shane Harvey
1c2651be58
PYTHON-2357 Specify error label in retryable writes test (#494)
PYTHON-2356 Add errorLabelsContain/errorLabelsOmit support to retryable writes tests
2020-10-02 12:56:33 -07:00
Shane Harvey
5b49557c59 PYTHON-2268 Close clients in test suite 2020-06-03 17:05:59 -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
Bernie Hackett
8f0ea1daec PYTHON-1797 PYTHON-1659 Update retryWrites tests 2019-07-15 17:33:51 -07:00
Shane Harvey
87951c33f8 PYTHON-1674 Refactor spec test runner for transactions
This enables us to reuse the transaction spec runner for tesing
retryable reads.
2019-04-25 14:27:41 -07:00
Bernie Hackett
7409f844e6 PYTHON-1740 - retryWrites defaults to true 2019-03-06 16:32:53 -08:00
Prashant Mital
2b1fdb091d SPEC 1153: Adding readConcern support to aggregation with $out (#400) 2019-02-27 15:59:18 -08:00
Shane Harvey
6fe00109c1 PYTHON-1650 Always increment txnNumber before starting a retryable write 2018-10-08 11:42:02 -07:00
Bernie Hackett
4d786fd0cd PYTHON-1329 - OP_MSG bulk writes 2018-06-21 16:03:20 -07:00
Shane Harvey
9d8024d9ea PYTHON-1590 Avoid thread limit in tests 2018-06-15 13:17:37 -07:00
Shane Harvey
622d33d0cb PYTHON-1545 Support for retryable writeConcernErrors
Return proper BulkWriteResult after a retryable write succeeds.
Reduce retryable writes test suite time from 90 to 30 seconds by
reducing the heartbeat interval.
2018-06-14 09:51:08 -07:00
Shane Harvey
96aeb461f9 PYTHON-1545 Consider more errors retryable 2018-06-07 14:37:01 -07:00
Bernie Hackett
577c167c88 PYTHON-1546 - Update various spec tests and adjust runners 2018-06-04 15:44:13 -07:00
Shane Harvey
5a652be993 PYTHON-1508 Add read_preference to TransactionOptions
All read operations use the transaction's read preference.
Add transaction read preference spec tests.
Remove write test in test_read_preferences.
2018-05-08 11:38:28 -07:00
Bernie Hackett
507f954ed4 Update copyright dates 2017-12-01 17:23:39 -08:00
Shane Harvey
47302096f9 PYTHON-1339 Retryable multi-statement writes.
MongoClient with retryWrites=true works when the cluster does not support retryable writes.
2017-11-20 12:18:00 -08:00
Shane Harvey
8b1aa3aafa PYTHON-1339 Retryable single-statement writes.
Add retryWrites MongoClient and URI setting.
Retry once for supported single-statement write operations including:
insert_one, update_one, delete_one, find_one_and_update, find_one_and_replace,
find_one_and_delete, update and remove with multi=False, and find_and_modify.
2017-10-30 14:23:16 -04:00