Noah Stapp
34ca759f85
PYTHON-5113 - Refactor test utils for async ( #2149 )
2025-03-12 12:59:56 -04:00
Iris
c9a85ad321
PYTHON-5090 Convert test.test_monitor to async ( #2106 )
2025-02-27 08:05:23 -08: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
Noah Stapp
739510214b
PYTHON-4731 - Explicitly close all MongoClients opened during tests ( #1855 )
2024-09-17 09:22:17 -04:00
Noah Stapp
d0193eb045
PYTHON-4533 - Convert test/test_client.py to async ( #1730 )
2024-07-10 13:15:13 -07:00
Noah Stapp
d6bf0e1e78
PYTHON-4264 Async PyMongo Beta ( #1629 )
2024-06-06 09:01:24 -07:00
Jib
fe37841f07
PYTHON-4147-fix: Remove quote wrapping and remove shell=true usage ( #1513 )
2024-02-07 14:24:20 -05:00
Jib
0f7e1b0110
PYTHON-4147: Silence noisy thread.start() RuntimeError at shutdown ( #1486 )
2024-02-05 08:46:32 -05:00
Steven Silvester
992d1507e7
PYTHON-4005 Replace flake8 and isort with ruff ( #1399 )
2023-10-19 11:56:22 -05: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
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
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
7c13667727
PYTHON-1898 Close events executor faster after the topology is freed
2019-07-26 12:51:35 -07:00
Bernie Hackett
507f954ed4
Update copyright dates
2017-12-01 17:23:39 -08:00
Bernie Hackett
e89ba4bcd0
PYTHON-1026 - Remove test assumption about primary host
2016-09-21 11:15:43 -07:00
Bernie Hackett
aec685b374
Fix up copyright dates.
2015-03-25 11:55:02 -07:00
A. Jesse Jiryu Davis
e8c03d65a7
Python 2 compatibility in TestMonitor.test_atexit_hook.
2015-01-12 21:04:07 -05:00
A. Jesse Jiryu Davis
b633af82a9
Simplify TestMonitor.
...
The executor is now registered immediately, don't need to wait.
2015-01-12 18:03:15 -05:00
A. Jesse Jiryu Davis
9d9b65e2c2
Shorter timeout in TestMonitor.
...
Make false negative (test passes but shouldn't) less likely.
2015-01-12 18:03:15 -05:00
A. Jesse Jiryu Davis
f0daebf4bb
PYTHON-799 Create a PeriodicExecutor class for background monitoring.
...
The executor will also be used to solve a deadlock in Cursor.__del__.
2014-12-17 13:19:05 -05:00
A. Jesse Jiryu Davis
5991635553
Unused imports in test files.
2014-11-17 16:15:12 -05:00
A. Jesse Jiryu Davis
21976d9976
Monitors stop themselves when the Topology is GC'ed.
2014-11-03 14:40:06 -05:00
A. Jesse Jiryu Davis
38848d47f3
MongoClient.close() stops monitors.
...
Subsequent operations restart them.
2014-11-03 14:40:06 -05:00
A. Jesse Jiryu Davis
7fb570d334
test_atexit_hook wasn't testing what it meant to.
2014-10-31 16:10:13 -04:00
A. Jesse Jiryu Davis
0a246d2033
Standardize how tests construct MongoClients.
2014-10-30 19:36:59 -04:00
A. Jesse Jiryu Davis
6b6f61f26c
Fix TestMonitor.test_atexit_hook.
2014-09-26 21:31:56 -04:00
A. Jesse Jiryu Davis
fdd93a1d78
Debug TestMonitor.test_atexit_hook.
2014-09-26 09:26:07 -04:00
A. Jesse Jiryu Davis
fea501f314
PYTHON-525 Try to halt monitors before exiting.
2014-09-24 19:12:30 -04:00